Re: Need help figuring out what I'm doing wrong accessing this Web Service

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8 January 2011 16:48, Tillman Stevens <Tillman.Stevens@rockingr.net> wrote:
> Thank you,
>
> I was finally able to get that much out of Agemni, but I've tried to use the SoapClient->__setCookie method and the SoapClient->__setSoapHeaders methods to set the 'cookie', but to no avail. Any chance you can help me there, or, if I'm asking too much, how much will you charge me to write this tool to pull data from their service and insert/update on exists into a mysql database?
>
> I really need this done by Monday.
>
> Thanks
>
> Tillman
>
> -----Original Message-----
> From: Richard Quadling [mailto:rquadling@gmail.com]
> Sent: Saturday, January 08, 2011 8:55 AM
> To: Tillman Stevens
> Subject: Re:  Need help figuring out what I'm doing wrong accessing this Web Service
>
> On 5 January 2011 21:12, Tillman Stevens <Tillman.Stevens@rockingr.net> wrote:
>> Richard,
>>
>> I will be having projects needed work coming up very soon, but I hope you'll let me bug you for one more question:
>>
>> When I submit login info to the AgLogin object, I get back the ResponseHeaders:
>>
>> HTTP/1.1 200 OK Date: Wed, 05 Jan 2011 21:08:49 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Set-Cookie: AGSESSION=bgBt0UDATeD6vFoMZCGIy4swRTMgYBjTQIzjU5tEUXE=; expires=Fri, 07-Jan-2011 07:00:00 GMT; path=/ Cache-Control: private, max-age=0 Content-Type: text/xml; charset=utf-8 Content-Length: 519
>>
>> Now, I know I use the __setCookie method on the ADBAccess class to send the cookie info to their ADBAccess web service, and I'm assuming, from the above, the data I would send as the cookie would be:
>>
>> AGSESSION=bgBt0UDATeD6vFoMZCGIy4swRTMgYBjTQIzjU5tEUXE=; expires=Fri, 07-Jan-2011 07:00:00 GMT;
>>
>> Am I right in assuming that?
>>
>> Again, thanks for all your help.
>>
>> Tillman
>>
>
> Normally, you only need to the send the cookie name/value. The cookie,
> in this instance, is just a session ID.
>
> The expiry data is data sent by the server to the client.

SoapHeaders are nothing to do with HTTP headers. Nothing at all. Don't
get them mixed up.

Strangely enough, I went down a HTTP stream context route to fix this
issue in another SOAP thread on this list.

If you've got the cookie, then you need to split it into name/value ...

list($name, $value) = explode('=', $cookie, 2);

should do that just fine.

So, with that, you can now do ...

$service = new ServiceXYZ();
$service->__setCookie($name, $value);

And that is a LOT easier than using a stream context. Next time, I'll RTFM.
-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux