Priyaaa
Priyaaa

Reputation: 21

svcutil not generating fault

I have received a wsdl from a java webservice team and when I try to generate c# proxy class using svcutil, it gives me an error on faults and doesn't generate those. I get the below error.

Warning: Fault named ProvApiException in operation put cannot be imported. Unsupported WSDL, the fault message part must reference an element. This fault message does not reference an element. If you have edit access to the WSDL document, you can fix the problem by referencing a schema element using the 'element' attribute.

I looked up the error and changed 'type' to 'element'. I also used /useSerializerForFaults option when generating the class, still no luck. It keeps giving me other errors. What should I edit in the wsdl to generate the faults? Also, any other option I should use in svcutil?

<complexType name="ProvApiException">
<sequence>
 <element name="errorCode" nillable="true" type="xsd:string"/>
 <element name="message" nillable="true" type="xsd:string"/>
 <element name="rootCause" nillable="true" type="xsd:string"/>
</sequence>

Upvotes: 2

Views: 194

Answers (0)

Related Questions