I try to implement simple SOAP server on ASP.NET and simple client on php and get the problem with response and request format. My server is very simple, take one string and return another:
[WebMethod]
public string HelloWorld(string Additional) {
return "Hello " + Additional;
}
I expect, that php client is such simple:
$client = new SoapClient('path');
print_r($client->HelloWorld('homm'));
Hello homm
But actually, function take only objects and return object with single member — HelloWorldResult:
$client = new SoapClient('path');
print_r($client->HelloWorld(array('Additional' => 'homm')));
stdClass Object
(
[HelloWorldResult] => Hello homm
)
Can I change this behavior? What part I need to change, server (ASP.NET) or client(php) to work with results and parameters indirect?