Home >Backend Development >PHP Tutorial > 怎么用PHP调用WebService
如何用PHP调用WebService?
别的系统有个WebService,http://118.145.3.40:9082/mblWebService/services/MaiCarInfoService?wsdl
我想用PHP来调用这个WebService。网上查了一下,这么写的:
$client = new SoapClient("http://118.145.3.40:9082/mblWebService/services/MaiCarInfoService?wsdl",
array('encoding'=>'UTF-8'));
$parm1 = "abcdefg";
$param = array('param0' => $parm1);
$arr = $client->sendMaiCarInfo($param);
var_dump($arr);
本来应该传XML字符串的,我先传个abcdefg测试一下,但是对方说根本没有被调用。
麻烦看一下怎么回事吧。PHP我也不熟啊~~