You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by shandor <ad...@easasoftware.com> on 2008/09/26 11:30:50 UTC

Session with http cookies

HI
I run Axis 1.4 on Tomcat.
My problem is that the server do not send cookies on the response.
My client will not work with soap headers so I must use http cookies.
What do I need to configure on the server so it will use cookies.
I did not find any handler to do that. Should I code one ?

Thanks
-- 
View this message in context: http://www.nabble.com/Session-with-http-cookies-tp19685237p19685237.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Session with http cookies

Posted by shandor <ad...@easasoftware.com>.
Thanks for your response,

I am using Axis 1.4 so I assume Axis2 features will not help me.
By now I managed to create sessions on the server explicitly:

HttpServletRequest req = (HttpServletRequest) 
MessageContext.getCurrentContext().getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);

req.getSession(true);

So now the server spit a cookie out and it being sent back by the client.
BUT... Axis completely ignores it. My service scope is set to "session" but
nevertheless
each request cause a new service object to be created ( like in request
scope )

What am I doing wrong ?





Keithgchapman wrote:
> 
> Hi,
> 
> Try deploying your service in transport scope. This can be done by adding
> an
> attribute such as shown below to your services.xml.
> 
> <service name="foo" scope=" transportsession">
> ......
> </service>
> 
> 
> You could refer this article [1] for more details.
> 
> Thanks,
> Keith
> 
> [1] http://wso2.org/library/231
> 
> 
> 
> 
> On Fri, Sep 26, 2008 at 3:00 PM, shandor <ad...@easasoftware.com>
> wrote:
> 
>>
>> HI
>> I run Axis 1.4 on Tomcat.
>> My problem is that the server do not send cookies on the response.
>> My client will not work with soap headers so I must use http cookies.
>> What do I need to configure on the server so it will use cookies.
>> I did not find any handler to do that. Should I code one ?
>>
>> Thanks
>> --
>> View this message in context:
>> http://www.nabble.com/Session-with-http-cookies-tp19685237p19685237.html
>> Sent from the Axis - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
> 
> 
> -- 
> Keith Chapman
> Senior Software Engineer
> WSO2 Inc.
> Oxygenating the Web Service Platform.
> http://wso2.org/
> 
> blog: http://www.keith-chapman.org
> 
> 

-- 
View this message in context: http://www.nabble.com/Session-with-http-cookies-tp19685237p19685543.html
Sent from the Axis - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Session with http cookies

Posted by keith chapman <ke...@gmail.com>.
Hi,

Try deploying your service in transport scope. This can be done by adding an
attribute such as shown below to your services.xml.

<service name="foo" scope=" transportsession">
......
</service>


You could refer this article [1] for more details.

Thanks,
Keith

[1] http://wso2.org/library/231




On Fri, Sep 26, 2008 at 3:00 PM, shandor <ad...@easasoftware.com> wrote:

>
> HI
> I run Axis 1.4 on Tomcat.
> My problem is that the server do not send cookies on the response.
> My client will not work with soap headers so I must use http cookies.
> What do I need to configure on the server so it will use cookies.
> I did not find any handler to do that. Should I code one ?
>
> Thanks
> --
> View this message in context:
> http://www.nabble.com/Session-with-http-cookies-tp19685237p19685237.html
> Sent from the Axis - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Keith Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org