Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 26587 invoked from network); 9 Jan 2007 02:19:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jan 2007 02:19:57 -0000 Received: (qmail 69344 invoked by uid 500); 9 Jan 2007 02:19:54 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 69330 invoked by uid 500); 9 Jan 2007 02:19:54 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 69319 invoked by uid 99); 9 Jan 2007 02:19:54 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jan 2007 18:19:54 -0800 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [61.88.115.245] (HELO SYD3.lansa.com.au) (61.88.115.245) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Jan 2007 18:19:44 -0800 Message-ID: <817522051E65D511A2740001028074C402D048D2@EX1> From: Alick Buckley To: axis-user@ws.apache.org Subject: RE: Http session from client side... Date: Tue, 9 Jan 2007 13:19:15 +1100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C73394.8F409820" X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01C73394.8F409820 Content-Type: text/plain; charset="iso-8859-1" I am using Axis 1.4 and to maintain a session using a Cookie, you need to use the same locator for all requests. org.apache.axis.client.Service locator = new MyLocator () ; locator.setMaintainSession ( maintainSession ) ; stub = locator.getXXX ( ) -----Original Message----- From: Ravi Krishnamurthy [mailto:ravik@savvion.com] Sent: Tuesday, 9 January 2007 1:10 PM To: axis-user@ws.apache.org Subject: Re: Http session from client side... Alex: Yes I was mentioning it in context to Axis1. I have not played with Axis2 yet. regards, Ravi Alex Huang wrote: > Ravi, > > Thanks for the quick reply. I don't see any call object in the stub > code. I remember call was in Axis 1.x. Is that what you are referring > to? > > Looking at the generated stub code, I decided perhaps the best thing to > do is calling OperationClient.getOptions().setManageSession(true). > However, that didn't do anything at all. Snoops showed that the > JSESSIONID was not added in the subsequent request. > > What else can I do here? > > Any help will be much appreciated. > > --Alex > > >> -----Original Message----- >> From: Ravi Krishnamurthy [mailto:ravik@savvion.com] >> Sent: Monday, January 08, 2007 4:47 PM >> To: axis-user@ws.apache.org >> Subject: Re: Http session from client side... >> >> Alex: >> May be try to set the call.setMaintainSession(true) in the stub code >> when the call object is created. >> >> regards, >> Ravi >> >> Alex Huang wrote: >> >>> Hi All, >>> >>> I'm interfacing with a webservices server that returns a cookie >>> Set-Cookie: JSESSIONID=C940DECC375E991239EE6A4F80304CB0 in my login >>> request and expects that I set that cookie in the >>> >> subsequent requests. >> >>> >>> I have used wsdl2java to create the client libraries and made the >>> login request using the client stubs generated. However, I can not >>> figure out how to get the HTTPSession back to retrieve this >>> >> cookie. I >> >>> tried using MessageContext.getMessageContext() but it >>> >> returns a null >> >>> pointer back to me. >>> >>> Searching on the archives reveals that >>> MessageContext.getMessageContext() should work if it's on >>> >> the server, >> >>> but what about the client? >>> >>> Thanks for any help you can give. >>> >>> --Alex >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org >> For additional commands, e-mail: axis-user-help@ws.apache.org >> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-user-help@ws.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org ------_=_NextPart_001_01C73394.8F409820 Content-Type: text/html; charset="iso-8859-1" RE: Http session from client side...

I am using Axis 1.4 and to maintain a session using a Cookie, you need to use the same locator for all requests.

  org.apache.axis.client.Service locator = new MyLocator () ;

  locator.setMaintainSession ( maintainSession ) ;

  stub = locator.getXXX ( )


-----Original Message-----
From: Ravi Krishnamurthy [mailto:ravik@savvion.com]
Sent: Tuesday, 9 January 2007 1:10 PM
To: axis-user@ws.apache.org
Subject: Re: Http session from client side...


Alex:
Yes I was mentioning it in context to Axis1.

I have not played with Axis2 yet.

regards,
Ravi
Alex Huang wrote:
> Ravi,
>
> Thanks for the quick reply.  I don't see any call object in the stub
> code.  I remember call was in Axis 1.x.  Is that what you are referring
> to?
>
> Looking at the generated stub code, I decided perhaps the best thing to
> do is calling OperationClient.getOptions().setManageSession(true).
> However, that didn't do anything at all.  Snoops showed that the
> JSESSIONID was not added in the subsequent request.
>
> What else can I do here? 
>
> Any help will be much appreciated.
>
> --Alex
>
>  
>> -----Original Message-----
>> From: Ravi Krishnamurthy [mailto:ravik@savvion.com]
>> Sent: Monday, January 08, 2007 4:47 PM
>> To: axis-user@ws.apache.org
>> Subject: Re: Http session from client side...
>>
>> Alex:
>> May be try to set the call.setMaintainSession(true) in the stub code
>> when the call object is created.
>>
>> regards,
>> Ravi
>>
>> Alex Huang wrote:
>>    
>>> Hi All,
>>> 
>>> I'm interfacing with a webservices server that returns a cookie
>>> Set-Cookie: JSESSIONID=C940DECC375E991239EE6A4F80304CB0 in my login
>>> request and expects that I set that cookie in the
>>>      
>> subsequent requests.
>>    
>>> 
>>> I have used wsdl2java to create the client libraries and made the
>>> login request using the client stubs generated.  However, I can not
>>> figure out how to get the HTTPSession back to retrieve this
>>>      
>> cookie.  I
>>    
>>> tried using MessageContext.getMessageContext() but it
>>>      
>> returns a null
>>    
>>> pointer back to me.
>>> 
>>> Searching on the archives reveals that
>>> MessageContext.getMessageContext() should work if it's on
>>>      
>> the server,
>>    
>>> but what about the client?
>>> 
>>> Thanks for any help you can give.
>>> 
>>> --Alex
>>>      
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>    
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>  



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

------_=_NextPart_001_01C73394.8F409820--