Home  >  Article  >  Backend Development  >  怎么用PHP调用WebService

怎么用PHP调用WebService

WBOY
WBOYOriginal
2016-06-13 11:43:03783browse

如何用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我也不熟啊~~

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn