使用PHP-SOAP作为带有WSDL的客户端时出现错误

有一个WebService,WSDL错误。我可以使用soapUI执行查询。 但是当尝试使用PHP时:

<?php 
$wsdl="URL with bad wsdl that works with soapUI";
$client = new SoapClient($wsdl,array('trace' => 1)); 
$result=$client->method();
echo $client->__getFunctions();
echo $client->__getLastRequest();
echo $client->__getLastResponse();
var_dump($result); 

?> 我用__getFunctions()得到函数/方法;没关系

我可以获取请求和响应的XML;没关系。

但是我在var_dump中得到了 NULL

我注意到使用soapUI时,该错误与方法的定义有关。

在__getFunctions()中,我得到一个:

array(1) {
  [0]=>
  string(83) "badnameForResponse method()"

使用soapUI时获得:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
   <SOAP-ENV:Body>
      <ns1:***CorrectResponseName*** xmlns:ns1="urn:sap-com:document:sap:soap:functions:mc-style">
         <EsMessage>

是否可以用$ resultado = $ client-> method($ params)覆盖服务响应名称?

tqscf 回答:使用PHP-SOAP作为带有WSDL的客户端时出现错误

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3056703.html

大家都在问