Question

I have a wsdl (RPC encoded) which contains 2 pair of operation which have the same operation name, but have different paramters, and different input/output messages.

Here are the important parts of the wsdl (i can generate java code, and the wsdl is valid).

<!-- message for the first operation -->
<wsdl:message name="SomethingGoodRequest">
    <wsdl:part name="paramOne" type="xsd:int">
    </wsdl:part>
    <wsdl:part name="paramTwo" type="soapenc:string">
    </wsdl:part>
    <wsdl:part name="paramThree" type="soapenc:string">
    </wsdl:part>
    <wsdl:part name="paramFour" type="soapenc:string">
    </wsdl:part>
    <wsdl:part name="paramFive" type="soapenc:string">
    </wsdl:part>
</wsdl:message>

<!-- message for the second operation -->
<wsdl:message name="SomethingGoodRequest1">
    <wsdl:part name="paramOne" type="xsd:int">
    </wsdl:part>
    <wsdl:part name="paramTwo" type="soapenc:string">
    </wsdl:part>
    <wsdl:part name="paramThree" type="tns1:VerySpecialTypeForGoodThings">
    </wsdl:part>
    <wsdl:part name="paramFour" type="soapenc:string">
    </wsdl:part>
    <wsdl:part name="paramFive" type="soapenc:string">
    </wsdl:part>
</wsdl:message>

<!-- the operations -->
<wsdl:operation name="SomethingGood" parameterOrder="paramOne paramTwo paramThree paramFour paramFive">
    <wsdl:input message="impl:SomethingGoodRequest" name="SomethingGoodRequest" />
    <wsdl:output message="impl:SomethingGoodResponse" name="SomethingGoodResponse" />
</wsdl:operation>
<wsdl:operation name="SomethingGood" parameterOrder="paramOne paramTwo paramThree">
    <wsdl:input message="impl:SomethingGoodRequest1" name="SomethingGoodRequest1" />
    <wsdl:output message="impl:SomethingGoodResponse1" name="SomethingGoodResponse1" />
</wsdl:operation>

<wsdl:operation name="SomethingGood">
    <wsdlsoap:operation soapAction=""/>
    <wsdl:input name="SomethingGoodRequest">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://nevermind" use="encoded"/>
    </wsdl:input>
    <wsdl:output name="SomethingGoodResponse">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://nevermind" use="encoded"/>
    </wsdl:output>
</wsdl:operation>

<wsdl:operation name="SomethingGood">
    <wsdlsoap:operation soapAction=""/>
    <wsdl:input name="SomethingGoodRequest1">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://nevermind" use="encoded"/>
    </wsdl:input>
    <wsdl:output name="SomethingGoodResponse1">
        <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://nevermind" use="encoded"/>
    </wsdl:output>
</wsdl:operation>

The problem is, whenever i try to call the second method (from the two who share the same name) i get this exception (500 Internal Server Error):

faultDetail: 
       {}:return code:  500
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Body>
    <soapenv:Fault>
      <faultcode>Server</faultcode>
      <faultstring>Missing operation for soapAction [] and body element [{http://nevermind/}SomethingGood] with SOAP Version [SOAP 1.1]</faultstring>
    </soapenv:Fault>
  </soapenv:Body>
</soapenv:Envelope>

The interesting thing is, that i can call every other operation (from the java client and from SoapUI as well) without any problems, and i can call the first operation from those who share the same name.

So i can successfully SomethingGood with 5 parameters, but when i try to call the one with the 3 parameters, i get the exception described above.

Is there any workaround, or only by fixing the wsdl? (i got the wsdl, so i can't edit it by myself)

Thanks in advance!

Was it helpful?

Solution

Although it's legal to overload methods in WSLD, but WS-I basic profile disallows this feature. AXIS, JAX-WS, CXF, Spring and some other frameworks claims to be compliant with basic profile. Whoever created this WSDL probably doesn't work with java/BP compliant web services, if you're stuck with these frameworks you'll have to modify WSDL.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top