I am working on a project that uses the first contract approach. I was given WSDL and three xsd's . When I use svcutil , it generates a wrapper around the response class as follows:
public partial class getDataByIdResponse1 { public getDataByIdResponse getDataByIdResponse; public getDataByIdResponse1() { } public getDataByIdResponse1(getDataByIdResponse getDataByIdResponse) { this.getDataByIdResponse = getDataByIdResponse; } }
getDataByIdResponse terminates inside the getDataByIdResponse1 object. This is done by svcutil , and I have no idea why. The getDataByIdResponse1 object getDataByIdResponse1 not exist in WSDL :
<wsdl:message name="getDataById"> <wsdl:part name="response" element="tns:getDataByIdResponse"/> </wsdl:message> <xs:element name="getDataByIdResponse"> <xs:complexType> <xs:sequence> <xs:element name="data" type="sbc:DataType" minOccurs="1" maxOccurs="1" /> </xs:sequence> </xs:complexType> </xs:element>
Why is the type getDataByIdResponse wrapped in getDataByIdResponse1 ? Is there a switch for svcutil that I should have used?
source share