When I test this WSDL with SoapUI, then I get real result, it just adds to numbers:
$client = new SoapClient("http://localhost:8080/calculator?wsdl");
$result = $client->add(3,3);
print_r($result);
This returns :
stdClass Object
(
[return] => 0
)
But should return 6. As it does in SoapUI.
Some debugging:
print_r($client->__getFunctions());
print_r($client->__getTypes());
Array
(
[0] => addResponse add(add $parameters)
)
Array
(
[0] => struct add {
int arg0;
int arg1;
}
[1] => struct addResponse {
int return;
}
)
addResponseExpects only one parameter, so you need to pass it in array or an object: