How can I use PHP to call WebService? Other systems have a WebService, 118.145.3.40: 9082 running webserviceservicesmaicarinfoservice? I want to use PHP to call this WebService. I checked it online and wrote: $ client & nbsp; new & nbsp; how does SoapClie use PHP to call WebService?
Other systems have a WebService, http: // 118.145.3.40: 9082/WebService/services/MaiCarInfoService? Wsdl
I want to use PHP to call this WebService. I checked it online and wrote the following:
$ Client = new SoapClient ("http: // 118.145.3.40: 9082/published webservice/services/MaiCarInfoService? Wsdl ",
Array ('encoding' => 'utf-8 '));
$ Parm1 = "abcdefg ";
$ Param = array ('param0' => $ parm1 );
$ Arr = $ client-> sendMaiCarInfo ($ param );
Var_dump ($ arr );
I should have passed the XML string. I first passed an abcdefg test, but the other party said it was not called at all.
Let's take a look at what's going on. I am not familiar with PHP either ~~
Share: More
------ Solution --------------------
$parm1 = "abcdefg";
$param = array('in0' => $parm1);
$arr = $client->sendMaiCarInfo($param);
Return
StdClass Object
(
[Out] => XML parsing error, not compliant with XML standards
)
$parm1 = '
1234
';
$param = array('in0' => $parm1);
$arr = $client->sendMaiCarInfo($param);
Return
StdClass Object
(
[Out] => success
)