I am in the process of developing a WSDL for my SOAP API, and I've run into a bit of an issue.
I started off with a single operation
, and it worked fine. But as soon as I added another operation
, I'm getting a rather weird error.
Consider the following (stripped down for brevity):
<message name="doSomethingRequest">
<part name="foo" type="xsd:integer" />
</message>
...
<portType name="myServicePort">
<operation name="doSomething">
<input message="tns:doSomethingRequest" />
<output message="tns:doSomethingResponse" />
</operation>
</portType>
...
<binding name="myServiceBinding" type="tns:myServicePort">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="doSomething">
<soap:operation soapAction="" />
<input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:mygroup:myservice" use="encoded" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
I am consuming this service using PHP in a very simple manner:
$ws = new SoapClient($wsdl_url);
$result = $ws->doSomething(1);
Now the problem stems from something in the WSDL, not the PHP. I have verified this by changing the <part name="foo" ... />
to <part name="bar" ... />
, and the SoapFault then changes to Function 'bar' doesn't exist
.
What am I missing?