login button

Sessions/Cookies with WSClient in WSDL Mode

Forums :

Hello,

I am trying to find out if there is a way to retain session cookies when using WSClient (specifically in WSDL mode).

I connect to a vendor's web service that uses a session-based authentication method. Unfortunately, even though my initial login() method call is successful, any other methods I call throw an exception because the information it needs is not available in the session.

I am able to get this working using the built-in PHP SOAP functions, but I need to make some calls that depend on file attachments, which was why I was hoping WSF/PHP could do what I needed. Any suggestions would be appreciated!

Below is the an example of what I'm trying to do:

------
$login_parameters = array(
'username' => MYUSER,
'password' => MYPASS
);

$client = new WSClient( array(
"wsdl" => "http://ws1.responsys.net/webservices/ResponsysWS?WSDL",
"to" => "http://ws1.responsys.net/webservices/ResponsysWS",
));

$proxy = $client->getProxy();

$proxy->login( $login_parameters );
$proxy->listFolders();
------

The login() call returns true, but the listFolders() method throws an exception:

Fatal error: Uncaught WS FAULT exception: [soapenv:Server.userException] java.rmi.RemoteException: RIAccount object is not available in session

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Sessions/Cookies with WSClient in WSDL Mode

Hi,
We do not have the built in session support at the moment.

Regards
Nandika

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.