Sessions/Cookies with WSClient in WSDL Mode
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
- Login or register to post comments
- Printer friendly version
- 243 reads











Re: Sessions/Cookies with WSClient in WSDL Mode
Hi,
We do not have the built in session support at the moment.
Regards
Nandika