Svcutil supports for WSDL
I am having problem with compile WSDL (not sure its version may be 1.1/2.0) document with Svcut开发者_运维技巧il. It gives below Warning. Also svcutil fail to generate few enum interface as well. May be it is happening because of below warning. I tried to use svcutil2 (codeplex) but it is not stable at all. My colleague compiled the same WSDL document with Java Axis 1.2 tool which works fine. Now not sure what to do. :-(
Warning: Fault named TechnicalFault in operation bookDeal cannot be imported. Unsupported WSDL, only one message part is supported for fault messages. This fault message references zero or more than one message part. If you have edit access to the WSDL file, you can fix the problem by removing the extra message parts such that fault message references just one part.
Warning: Fault named BusinessFault in operation bookDeal cannot be imported. Unsupported WSDL, only one message part is supported for fault messages. This fault message references zero or more than one message part. If you have edit access to the WSDL file, you can fix the problem by removing the extra message parts such that fault message references just one part.
Warning: Fault named ValidationFault in operation bookDeal cannot be imported. Unsupported WSDL, only one message part is supported for fault messages. This fault message references zero or more than one message part. If you have edit access to the WSDL file, you can fix the problem by removing the extra message parts such that fault message references just one part.
Warning: The optional WSDL extension element 'header' from namespace 'http://schemas.xmlsoap.org/wsdl/soap/' was not handled. XPath://wsdl:definitions[@targetNamespace='ns://abcGroup/globalMarkets/tradeExecution/fxMmDealExecutionService/v1/wsdl']/wsdl:binding[@name='SOAPService_Binding1']/wsdl:operation[@name='bookDeal']/wsdl:fault[@name='TechnicalFault']
Warning: The optional WSDL extension element 'header' from namespace 'http://schemas.xmlsoap.org/wsdl/soap/' was not handled. XPath://wsdl:definitions[@targetNamespace='ns://abcGroup/globalMarkets/tradeExecution/fxMmDealExecutionService/v1/wsdl']/wsdl:binding[@name='SOAPService_Binding1']/wsdl:operation[@name='bookDeal']/wsdl:fault[@name='BusinessFault']
Warning: The optional WSDL extension element 'header' from namespace 'http://sch emas.xmlsoap.org/wsdl/soap/' was not handled. XPath://wsdl:definitions[@targetNamespace='ns://abcGroup/globalMarkets/tradeExecution/fxMmDealExecutionService/v1/wsdl']/wsdl:binding[@name='SOAPService_Binding1']/wsdl:operation[@name='bookDeal']/wsdl:fault[@name='ValidationFault']
If I am commenting few things in WSDL then svcutil compiles the document. you can see the commenting line below.
<wsdl:message name="bookDeal">
<wsdl:part name="in" element="tns:bookDeal"/>
<wsdl:part name="oob" element="ns0:messageContext"/>
</wsdl:message>
<wsdl:message name="bookDealResponse">
<wsdl:part name="out" element="tns:bookDealResponse"/>
<wsdl:part name="oob" element="ns0:messageContext"/>
</wsdl:message>
<wsdl:message name="bookDeal_TechnicalFault">
<!--<wsdl:part name="techFault" element="ns1:technicalFault"/>-->
<wsdl:part name="oob" element="ns0:messageContext"/>
</wsdl:message>
<wsdl:message name="bookDeal_BusinessFault">
<!--<wsdl:part name="bizFault" element="ns1:businessFault"/>-->
<wsdl:part name="oob" element="ns0:messageContext"/>
</wsdl:message>
<wsdl:message name="bookDeal_ValidationFault">
<!--<wsdl:part name="vldFault" element="ns1:validationFault"/>-->
<wsdl:part name="oob" element="ns0:messageContext"/>
</wsdl:message>
<wsdl:portType name="FXMMDealExecutionServiceInterface">
<wsdl:operation name="bookDeal">
<wsdl:input message="tns:bookDeal"/>
<wsdl:output message="tns:bookDealResponse"/>
<wsdl:fault name="TechnicalFault" message="tns:bookDeal_TechnicalFault"/>
<wsdl:fault name="BusinessFault" message="tns:bookDeal_BusinessFault"/>
<wsdl:fault name="ValidationFault" message="tns:bookDeal_ValidationFault"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SOAPService_Binding1" type="tns:FXMMDealExecutionServiceInterface">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="bookDeal">
<wsdl:documentation/>
<soap:operation style="document" soapAction="bookDeal"/>
<wsdl:input>
<soap:body use="literal" parts="in"/>
<soap:header use="literal" message="tns:bookDeal" part="oob"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal" parts="out"/>
<soap:header use="literal" message="tns:bookDealResponse" part="oob"/>
</wsdl:output>
<wsdl:fault name="TechnicalFault">
<soap:fault use="literal" name="TechnicalFault"/>
<!--<soap:header use="literal" message="tns:bookDeal_TechnicalFault" part="oob"/>-->
</wsdl:fault>
<wsdl:fault name="BusinessFault">
<soap:fault use="literal" name="BusinessFault"/>
<!--<soap:header use="literal" message="tns:bookDeal_BusinessFault" part="oob"/>-->
</wsdl:fault>
<wsdl:fault name="ValidationFault">
<soap:fault use="literal" name="ValidationFault"/>
<!--<soap:header use="literal" message="tns:bookDeal_ValidationFault" part="oob"/>-->
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
Please help!
If I used svcutil.exe /ixt /dconly
then I am not getting any warning and I can see all fault classes. But I don't see any service contract in this case.
If I removed /dconly
then I will get the same warning.
精彩评论