Search code examples
javaxmlweb-servicessoapwsdl

WSDL warning: Defective soapbind:fault element. what does that mean?


Here is a snippet from my WSDL file;

<wsdl:portType name="MtchWS">                                                 
    <wsdl:operation name="inference">
        <wsdl:input message="tns:inferencerequest" name="inferencerequest"/>
        <wsdl:output message="tns:inferenceresponse" name="inferenceresponse"/>
        <wsdl:fault message="tns:errorresponse" name="errorresponse"/>             
    </wsdl:operation>
</wsdl:portType>

<wsdl:binding name="MtchWSBinding" type="tns:MtchWS">                  
    <soap:binding style="document"                                                   
        transport="http://schemas.xmlsoap.org/soap/http"/>                           
    <wsdl:operation name="inference">
        <soap:operation soapAction="http://www.mywebsite.com/webservice"/>           
        <wsdl:input name="inferencerequest">
            <soap:body use="literal"/>                                               
        </wsdl:input>
        <wsdl:output name="inferenceresponse">
            <soap:body use="literal"/>
        </wsdl:output>
        <wsdl:fault name="errorreponse">
            <!-- <soap:fault use="literal"/>-->
        </wsdl:fault>
    </wsdl:operation>
</wsdl:binding>

<wsdl:service name="MtchWSService">
    <wsdl:port binding="tns:MtchWSBinding" name="MtchWSPort">          
        <soap:address location="http://localhost:8080/mwp/mws"/>             
    </wsdl:port>
</wsdl:service>       

in one of the lines above (the one including "wsdl:binding name="MtchWSBinding" type="tns:MtchWS") I get a warning saying;

WS-I: (BP2032) Defective soapbind:fault element: the "name" attribute value does not match the value of the "name" attribute on the parent element wsdl:fault.

What does that means and how can i fix this? my web service seems to be work fine but I have some other problems (with WSDL2ObjC) which I think it is releted to this warning.

tnx


Solution

  • ok I fixed;

    just added the

    <wsdl:fault name="errorresponse">
                 <soap:fault name="errorresponse" use="literal"/>
            </wsdl:fault>