I'll tell you about PHP, as it's my domain.
You have to understand that SOAP abstract the XML "talk" that occurs between the server and the client.
If a method defined into the wsdl file return a string that contains the xml, it's the sole decision of the webservice maker.
In the wsdl, you can see the return type of a call, and you need to code your script in accordance.
For example, if I take the function FahrenheitToCelsius() from your wsdl, we have this
Code:
<s:element name="FahrenheitToCelsius">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="Celsius" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="FahrenheitToCelsiusResult">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="FahrenheitToCelsiusResult" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
This define that the method FahrenheitToCelsius() takes a sequence (array) in input with a paramter named "Farenheit" that contains a string.
The FahrenheitToCelsiusResult type is the answer from the server.
It's defined as a sequence too (so, an array) with an "Farenheit" index that contains a string with the returned value.
The php script to use this would be this one:
PHP Code:
<?php
$client = new SoapClient("http://www.w3schools.com/webservices/tempconvert.asmx?WSDL");
$answer=$client->FahrenheitToCelsius(array("Fahrenheit"=>"120"));
var_dump( $answer);
?>
and it's output would be
Code:
object(stdClass)#2 (1) { ["FahrenheitToCelsiusResult"]=> string(16) "48.8888888888889" }
As you see, the PHP soap client encase it into an anonymous class.
You can get the XML, as stated
into the PHP documentation, by turning the "trace" flag true on the instantiation of the SOAP client
PHP Code:
<?php
$client = new SoapClient("http://www.w3schools.com/webservices/tempconvert.asmx?WSDL", array("trace"=>true));
And in that case, you can simply get the xml answer with
PHP Code:
$xml=$client->__getLastRequest();
This script:
PHP Code:
<?php
$client = new SoapClient("http://www.w3schools.com/webservices/tempconvert.asmx?WSDL", array("trace"=>true));
$answer=$client->FahrenheitToCelsius(array("Fahrenheit"=>"120"));
//indicate to the browser that the output is XML, and not html
header('content-type: text/xml');
print($client->__getLastRequest());
returns this:
http://webalis.com/soap.php