Sessions/Cookies with WSClient in WSDL Mode

krypt99's picture
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
nandika's picture

Re: Sessions/Cookies with WSClient in WSDL Mode

Hi, We do not have the built in session support at the moment. Regards Nandika
library project main code
Learn Cloud
Learn
Cloud

The WSO2 Application Server is a reliable application server that can host your enterprise web applications. The WSO2 Application Server as a Service is offered in StratosLive, the WSO2 Platform as a Service. This article explains how a simple web application can be developed and deployed from Carbon Studio to the WSO2 Application Server...

Latest Webinar
Different groups within an organization need to monitor different Key Performance Indicators (KPIs) - An operations team will be interested in the response times of business services and loads of each service,..
Thursday, February 9th 2012, 09.00 AM (PST)

Thursday, February 9th 2012, 10.00 AM (GMT)