PHP SoapClient 请求:不是此服务的有效方法
好吧,我想我需要另一双眼睛来观察这个。我正在对远程服务器上的回显Web服务进行简单的php soapclient调用。我很确定我没有任何拼写错误,并且函数调用是正确的。但是,我收到一个致命错误,声称该函数不是有效的方法。以下是 Web 服务类型的var_dump。
array(4) { [0]=> string(88) “struct EspException { string Code;字符串受众;字符串源;字符串消息;}“ [1]=> string(71) ”struct ArrayOfEspException { string Source;EspException Exception;}“ [2]=> string(43) ”struct EchoTestRequest { string ValueIn; }”[3]=> string(45) “struct EchoTestResponse { string ValueOut; }” }
致命错误:Uncaught SoapFault 异常:[客户端] 函数(“EchoTestRequest”)不是 /home/grafixst/public_html/cpaapp/echo_test.php:38 堆栈跟踪:#0 /home/grafixst/public_html/cpaapp/echo_test.php(38): SoapClient->__call('EchoTestRequest', Array) #1 /home/grafixst/public_html/cpaapp/echo_test.php(38): SoapClientAuth->EchoTestRequest(Array) #2 {main} throw in /home/grafixst/public_html/cpaapp/drew/echo_test.php on line 38
以下是我用于进行调用的代码:
require_once('SoapClientAuth.php');
ini_set("soap.wsdl_cache_enabled", "0");
#- Loading the WSDL document
$server = "https://wsonline.seisint.com/WsAccurint/EchoTest?ver_=1.65";
$wsdl = $server . "&wsdl";
$client = new SoapClientAuth($wsdl,
array(
'login' => $username,
'password' => $password
));
$types = $client->__getTypes();
var_dump($types);
echo "</br>";
$req = $client->EchoTestRequest(array('ValueIn' => 'echo'));
print $req->ValueOut;
echo "</br>";