I'm really quite new to PHP but need to figure out a way how to use remote WSDL API. For this I was told that I need to get a session cookie from WSDL containing session Id so I can make subsequent SOAP calls. I have no idea how to get this session cookie. I was able to successfully use Ping() function which means SOAP connection works, but that's as far as I went. This is my PHP code:
My wsdl.php file:
Code: Select all
<?
require_once('SOAP/Client.php');
$wsdl="http://yul.globaltsg.com//TSGWebServices/WebService.asmx?WSDL";
$conn = new SOAP_WSDL($wsdl);
$client = $conn->getProxy();
$params = Array(
'agencyId'=>'123',
'userName'=>'sab',
'userPassword'=>'XXXX'
);
$prof_params = Array(
'username'=>'joe',
'password'=>'YYY'
);
$client->Login($params);
$obj = $client->RetrieveAgentList();
foreach($obj as $key => $value)
{
print "$key => $value\n";
}
//echo $client->RetrieveAgentList();
?>
"error_message_prefix => mode => 1 level => 1024 code => soap:Server message => Unhandled Exception userinfo => backtrace => Array callback =>"
Please help, I think I need to get a session cookie to make this work, but have no idea how to do this.
Thank you very much in advance,
Victor.