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 Jason Wells <ja...@wells.me> on 2009/01/28 00:13:41 UTC
Session cookie in ADB client HTTP request
Hi,
I used wsdl2java to generate an ADB client that goes against a
stateful service in Axis2. When I call service operations with the
client, the JSESSIONID that the server sends in the HTTP responses
aren't maintained in its requests, so the server opens a new session
with each request. How can I configure the client to maintain the
session? In other words, I want to do what it looks like you can do in
Axis1 with these settings:
Stub.setMaintainSession(true);
Stub._setProperty(Call.SESSION_MAINTAIN_PROPERTY, new Boolean(true));
Thanks,
Jason
Re: Session cookie in ADB client HTTP request
Posted by Amila Suriarachchi <am...@gmail.com>.
Please see this sample
thanks,
Amila.
On Fri, Jan 30, 2009 at 9:17 AM, Jason Wells <ja...@wells.me> wrote:
> This still isn't working for me, and I really need a solution pronto. Can
> anyone point me to an example of an ADB client that does this?
>
> Jason
>
>
> On Jan 28, 2009, at 11:25 AM, Jason Wells wrote:
>
> Hi Amila,
> With this set, the server is still instancing one service object per
> request, and when I examine the interaction in tcpmon, I still don't see
> JSESSIONID in the stub's requests. Anything else I need to do?
>
> Jason
>
>
> On Jan 27, 2009, at 9:45 PM, Amila Suriarachchi wrote:
>
> On Wed, Jan 28, 2009 at 4:43 AM, Jason Wells <ja...@wells.me> wrote:
>
>> Hi,
>>
>> I used wsdl2java to generate an ADB client that goes against a stateful
>> service in Axis2. When I call service operations with the client, the
>> JSESSIONID that the server sends in the HTTP responses aren't maintained in
>> its requests, so the server opens a new session with each request. How can I
>> configure the client to maintain the session? In other words, I want to do
>> what it looks like you can do in Axis1 with these settings:
>>
>> Stub.setMaintainSession(true);
>> Stub._setProperty(Call.SESSION_MAINTAIN_PROPERTY, new Boolean(true));
>
>
> in axis2
> stub._getServiceClient().getOptions().setManageSession(true);
>
> thanks,
> Amila.
>
>>
>>
>> Thanks,
>> Jason
>>
>
>
>
>
--
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/
Re: Session cookie in ADB client HTTP request
Posted by Jason Wells <ja...@wells.me>.
This still isn't working for me, and I really need a solution pronto.
Can anyone point me to an example of an ADB client that does this?
Jason
On Jan 28, 2009, at 11:25 AM, Jason Wells wrote:
> Hi Amila,
>
> With this set, the server is still instancing one service object per
> request, and when I examine the interaction in tcpmon, I still don't
> see JSESSIONID in the stub's requests. Anything else I need to do?
>
> Jason
>
>
> On Jan 27, 2009, at 9:45 PM, Amila Suriarachchi wrote:
>
>> On Wed, Jan 28, 2009 at 4:43 AM, Jason Wells <ja...@wells.me> wrote:
>> Hi,
>>
>> I used wsdl2java to generate an ADB client that goes against a
>> stateful service in Axis2. When I call service operations with the
>> client, the JSESSIONID that the server sends in the HTTP responses
>> aren't maintained in its requests, so the server opens a new
>> session with each request. How can I configure the client to
>> maintain the session? In other words, I want to do what it looks
>> like you can do in Axis1 with these settings:
>>
>> Stub.setMaintainSession(true);
>> Stub._setProperty(Call.SESSION_MAINTAIN_PROPERTY, new Boolean(true));
>>
>> in axis2
>> stub._getServiceClient().getOptions().setManageSession(true);
>>
>> thanks,
>> Amila.
>>
>>
>> Thanks,
>> Jason
>
>
Re: Session cookie in ADB client HTTP request
Posted by Jason Wells <ja...@wells.me>.
Hi Amila,
With this set, the server is still instancing one service object per
request, and when I examine the interaction in tcpmon, I still don't
see JSESSIONID in the stub's requests. Anything else I need to do?
Jason
On Jan 27, 2009, at 9:45 PM, Amila Suriarachchi wrote:
> On Wed, Jan 28, 2009 at 4:43 AM, Jason Wells <ja...@wells.me> wrote:
> Hi,
>
> I used wsdl2java to generate an ADB client that goes against a
> stateful service in Axis2. When I call service operations with the
> client, the JSESSIONID that the server sends in the HTTP responses
> aren't maintained in its requests, so the server opens a new session
> with each request. How can I configure the client to maintain the
> session? In other words, I want to do what it looks like you can do
> in Axis1 with these settings:
>
> Stub.setMaintainSession(true);
> Stub._setProperty(Call.SESSION_MAINTAIN_PROPERTY, new Boolean(true));
>
> in axis2
> stub._getServiceClient().getOptions().setManageSession(true);
>
> thanks,
> Amila.
>
>
> Thanks,
> Jason
Re: Session cookie in ADB client HTTP request
Posted by Amila Suriarachchi <am...@gmail.com>.
On Wed, Jan 28, 2009 at 4:43 AM, Jason Wells <ja...@wells.me> wrote:
> Hi,
>
> I used wsdl2java to generate an ADB client that goes against a stateful
> service in Axis2. When I call service operations with the client, the
> JSESSIONID that the server sends in the HTTP responses aren't maintained in
> its requests, so the server opens a new session with each request. How can I
> configure the client to maintain the session? In other words, I want to do
> what it looks like you can do in Axis1 with these settings:
>
> Stub.setMaintainSession(true);
> Stub._setProperty(Call.SESSION_MAINTAIN_PROPERTY, new Boolean(true));
in axis2
stub._getServiceClient().getOptions().setManageSession(true);
thanks,
Amila.
>
>
> Thanks,
> Jason
>
>
--
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/
RE: Session cookie in ADB client HTTP request
Posted by Raghu Upadhyayula <ru...@responsys.com>.
Hi Jason,
Try this ...
stub._getServiceClient().getOptions().setManageSession(true);
Thanks
Raghu
-----Original Message-----
From: Jason Wells [mailto:jason@wells.me]
Sent: Tuesday, January 27, 2009 5:14 PM
To: axis-user@ws.apache.org
Subject: Session cookie in ADB client HTTP request
Hi,
I used wsdl2java to generate an ADB client that goes against a
stateful service in Axis2. When I call service operations with the
client, the JSESSIONID that the server sends in the HTTP responses
aren't maintained in its requests, so the server opens a new session
with each request. How can I configure the client to maintain the
session? In other words, I want to do what it looks like you can do in
Axis1 with these settings:
Stub.setMaintainSession(true);
Stub._setProperty(Call.SESSION_MAINTAIN_PROPERTY, new Boolean(true));
Thanks,
Jason