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

From: Date: Sun, 09 Jan 2011 16:17:31 +0000
Subject: Re: [SOAP] Need help figuring out what I'm doing wrong accessing this Web Service
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20  Groups: php.soap 
Request: Send a blank email to php-soap+get-3236@lists.php.net to get a copy of this message
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: [SOAP] 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

« previous php.soap (#3236) next »