我必须开发一个连接到soap webservice服务器的php客户端。使用SoapUI,我可以测试工作正常的test服务。
但是从我的php客户端,我得到了以下错误:
来自>>的<<附近的语法错误
下面是我的php客户端代码:
$wsdl = 'http://intrageo.cannes.fr:81/AdresseRecherche/searchByWhereClause?wsdl';
$trace = true;
$exceptions = false;
$xml_array['context'] = '?';
$xml_array['table'] = 'adr_digadr';
$xml_array['colonneARecuperer'] = 'numero';
$xml_array['clauseWere'] = 'nomvoie= \'BOULEVARD COINTET\'';
$xml_array['nbMaxLignes'] = 10;
try {
$client = new SoapClient($wsdl, array('trace' => $trace, 'exceptions' => $exceptions));
$response = $client->getDistinctValue($xml_array);
} catch (Exception $e) {
echo "Error!";
echo $e->getMessage();
echo 'Last response: '. $client->__getLastResponse();
}
var_dump($response);谢谢你的帮助。
发布于 2017-11-27 17:53:45
如果我使用$response=$client->_soapCall("getDistinctValue",$xml_array);而不是$response=$client->getDistinctValue($xml_array),它可以工作
https://stackoverflow.com/questions/47459829
复制相似问题