On Wed, 2011-03-30 at 02:06 +0000, Richard Jose wrote: > Hello everyone, > > Below is a simple code I am trying to run to consume a REST service > with Apache's httpclient 4.1. I was of the opinion authscope would take > care of the sessions but I was obviously wrong
HTTP authentication and HTTP state management are not the same thing. Unlike form based authentication HTTP auth schemes such as BASIC and DIGEST do not imply or require a stateful session. > Can someone please point > out what I am missing. Kind of stuck. Session keeps getting expired > bbetween REST requests. > ... > > Someone please help me or atleast point me in the right direction as to > how I can access this REST service without having to provide the > authentication details over and over and without getting session > expired error. > > Note: Actually the REST response should be an xml. > A wire / context log of the HTTP session might help. Do you execute requests within the same HTTP context, as described here? http://hc.apache.org/httpcomponents-client-ga/tutorial/html/authentication.html#d4e974 Oleg --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
