princedesmers Posted November 23, 2017 Share Posted November 23, 2017 Hi, I have to develop a php client which connects to a soap webservice server. With SoapUI, I can test the webservice which is working fine. But from my php client, I get the following error: syntax error near <<from>> Here is my php client code: <?php $wsdl='http://intrageo.cannes.fr:81/AdressseRecherche/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->getMesssage(); echo 'Last response: '.$client->_getLastResponse(); } var_dump($response); ?> Thanks a lot for help. Link to comment Share on other sites More sharing options...
dodgeitorelse3 Posted November 23, 2017 Share Posted November 23, 2017 Possibly in the $xml_array['clauseWere']='nomvoie=\' Link to comment Share on other sites More sharing options...
maxxd Posted November 26, 2017 Share Posted November 26, 2017 What is SoapClient::getDisctinctValue()? As far as I can tell, that's not a SoapClient method. Link to comment Share on other sites More sharing options...
princedesmers Posted November 27, 2017 Author Share Posted November 27, 2017 It works if I use $response=$client->_soapCall("getDistinctValue",$xml_array); instead of $response=$client->getDistinctValue($xml_array) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.