I am working on a project that uses the contract first approach. I was given a WSDL
and three xsd's
. When I use svcutil
it generates a wrapper around the response class like so:
public partial class getDataByIdResponse1 {
public getDataByIdResponse getDataByIdResponse;
public getDataByIdResponse1() {
}
public getDataByIdResponse1(getDataByIdResponse getDataByIdResponse) {
this.getDataByIdResponse = getDataByIdResponse;
}
}
The getDataByIdResponse
is wrapped inside a getDataByIdResponse1
object. This is done by svcutil
and I have no idea why. The getDataByIdResponse1
object does not exist in the 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
I should have used?