简体   繁体   中英

communication with asmx webservices from php through SOAP extension

I'm trying to communicate with a remote webservice, using the direction of some guides I found.

Unfortunately, my code gets -1 instead of the correct result. In this case the result should be result = 328000.

I tested with WCF test client

I don't know what to do next.

<?php
$soap = new SoapClient('http://www.auto1.cz/datalink/Landlord.asmx?WSDL');
// parameter 
$param=array("strVIN"=>"TMBJG9NEXH0060808");
$result=$soap->GetSellingPrice($param);
echo ($result->GetSellingPriceResult);
?>

Solved, problem was using double quotes (") instead single ones (')

... $param=array('strVIN'=>'TMBJG9NEXH0060808'); ...

Now it worsk properly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM