我必须开发一个连接到soap webservice服务器的php客户端。 使用SoapUI,我可以测试工作正常的Web服务。
但是从我的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);
感谢您的帮助。
答案 0 :(得分:0)
如果我使用$ response = $ client-> _soapCall(" getDistinctValue",$ xml_array),它会起作用;代替$ response = $ client-> getDistinctValue($ xml_array)