How to get Data Service query to return type other than String?

muckypup's picture

I have set up a data service to call a stored procedure which returns 4 columns. An int, a string and 2 longs.

   <query id="sp_GetDisallowedComponents" useConfig="DB">
        <sql>EXEC dbo.GetDisallowedComponents </sql>
        <result element="DisallowedData" rowName="DisallowedDataRow">
            <element name="ID" column="ID"/>
            <element name="ComponentName" column="ComponentName"/>
            <element name="MinVersion" column="MinVersion"/>
            <element name="MaxVersion" column="MaxVersion"/>
        </result>
    </query>

 

The problem is that these columns are always string in the generated WSDL.

 

<xs:complexType name="DisallowedDataRow">
<xs:sequence>
<xs:element minOccurs="0" name="ID" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="ComponentName" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="MinVersion" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="MaxVersion" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>

Is there a way of specifying the types of the columns?

Steve

 

library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)