I have a SOAP server with a method that returns a boolean indicating success and a string indicating an error message (empty on success). The WDSL file defines this as follows:
<message name="configureDisplayerRequest">
<part name="id" type="xsd:string" />
<part name="power" type="xsd:boolean" />
<part name="color" type="xsd:string" />
<part name="text" type="xsd:string" />
</message>
<message name="configureDisplayerResponse">
<part name="result" type="xsd:boolean" />
<part name="errorMessage" type="xsd:string" />
</message>
How do I return multiple values from my PHP code?
On my client side, written in C# using a client generated by Visual Studio, the method has the following signature:
public bool configureDisplayer(string id, bool power, string color, string text, out string errorMessage)
I tried to do something similar on the PHP server-side assuming that it might work with a bit of luck, but it doesn't:
public function configureDisplayer( $id, $power, $color, $text, & $errorMessage ) // Output parameter & $errorMessage, also returns a boolean.
If I change my WSDL so that the method only returns a single string, and then if I only return a single string in my PHP server side code, it works fine. However, how can I return more than a single value?