Jump to content

php soap passing cooking from authentication service to data access service


tillman.stevens

Recommended Posts

Okay,

 

On my original problem, I have been able to authenticate with the web service login service, and extract a cookie as follows from the web-service:

 

$s_Cookie = $agLoginService->agGetCookie();

$s_Cookie = AGSESSION=oxhbjcKtPw5sOymAD8m8KcKR6JL4i+TIE5mZxwOrXLwCRr8iTOvPxA==;

 

Now, I create data access soapclient:

 

$agDataService = new SoapClient($s_DataURL, $a_SoapOptions);  //yes I know I should build my own class wrapper around soapClient, but I am trying to make sure I know what to build before I do

 

next in the process I need to set the cookie for the data access service.

 

I tried using:

<b>$agDataService->__setCookie('cookie', $s_Cookie);</b>

 

but I don't think it's right because when I call any of the service's functions, I get no data back.

 

This is what their engineer had to say ( he is no help in php at all)

 

This is a question referring the http headers.  He needs to set the cookies as given in the examples on the wiki page.  The cookie is specified in a response http header as: Set-Cookie.  So the http headers he got back are correct.  The cookie he has to set is AGSESSION=oxhbjcKtPw5sOymAD8m8KcKR6JL4i+TIE5mZxwOrXLwCRr8iTOvPxA==;  There should be an api for setting the cookie if not there is one for setting the http header.  Set the http header name for the request (cookie - notice that is different than what you get back from an http response - read the rfc spec for http for all of the details) then set the value.  The semi colon at the end is the delimiter for http headers (in the rfc).  That is all he needs to do if he gets back some login error that means the cookies did not get set correctly.

 

Any ideas or help will be great. Thank you.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.