PHP ~ get asmx web services by SoapClient example

GetInformation is a method of the web service, and return json string

-------------------------------------------------------------------------------------------
$wsdl = 'http://www.ggyy.com/service.asmx?WSDL';

$client = new SoapClient($wsdl);
$vem = $client->__call('GetInformation',array(null));
$result = $vem->GetInformationResult;

$json = json_decode($result);

$Header = $json->Header;
-------------------------------------------------------------------------------------------

reference
http://www.php.net/manual/en/soapclient.call.php

沒有留言:

發佈留言