当我用 SoapUI 测试这个 WSDL 时,我得到了真实的结果,它只是增加了数字:
$client = new SoapClient("http://localhost:8080/calculator?wsdl");
$result = $client->add(3,3);
print_r($result);
这返回:
stdClass Object
(
[return] => 0
)
但应该返回 6。就像在 SoapUI 中一样。
一些调试:
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;
}
)