Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 30672 invoked from network); 7 May 2009 13:49:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 May 2009 13:49:08 -0000 Received: (qmail 17810 invoked by uid 500); 7 May 2009 13:49:04 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 17755 invoked by uid 500); 7 May 2009 13:49:04 -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 17746 invoked by uid 99); 7 May 2009 13:49:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 May 2009 13:49:04 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of amardeepsinghkhera@gmail.com designates 209.85.217.210 as permitted sender) Received: from [209.85.217.210] (HELO mail-gx0-f210.google.com) (209.85.217.210) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 May 2009 13:48:54 +0000 Received: by gxk6 with SMTP id 6so1410760gxk.16 for ; Thu, 07 May 2009 06:48:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=UeyTlLn50A4nW4naXLtY1qLp1sKU62F0PIp/zWW1H/Y=; b=f8SChaxzuP0uGs0HIL+bE4DJ+IA7qUIuERxABAcQ62RuLTVW8i4x+Uhr1ZzIPqljqx 7n9oYHqYb4do5BNTBKrb2nBYX3sDccsYHQcKuzEORZ/r6G7AknA3WSxuUZ4DLFgek0Zj zRspTSG9iTI+8BvvcRsGPwGgDqH/LQEd9xq58= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Gy+PerQlUuSTssfPbKKl05D48avZb8vCXbVk2hbAGEMZ/kyvOIpem7L4raKgWZ4tx5 +n0NCO9hdSKgcbnNDfIc8QSZ6bgPINVEbXvkX+nZ7toDchSbfLoVpjJ+MF8Axl8bLIX+ /KRTJ4XqSIsB7aiEE6ID2lv3ozPh+JIju633U= MIME-Version: 1.0 Received: by 10.100.43.10 with SMTP id q10mr5118702anq.92.1241704111860; Thu, 07 May 2009 06:48:31 -0700 (PDT) Date: Thu, 7 May 2009 19:18:31 +0530 Message-ID: <75c7f8780905070648s1a4dd307tfc16cf1eacb7db7b@mail.gmail.com> Subject: Queries regarding session managment in axsi2 From: amardeep singh khera To: axis-user@ws.apache.org Content-Type: multipart/alternative; boundary=0016e6441f3a80eba4046952c465 X-Virus-Checked: Checked by ClamAV on apache.org --0016e6441f3a80eba4046952c465 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi All, I am facing some problem in implementing session management while using axis2. It will be great if anyone can help me out with few queries. My Scenario: The scenario which I am trying to implement is very simple one. Basically I have a service implementation class which has a Login and couple of business methods. Now from a client when I call Login method of the service I pass user name and password. At the server my service class authenticate the user and sends response back to client with the session id. I am trying to implement transport session so at client I am able to see session using this code snippet : stub = *new* MyStub(*serviceUrl*); client = stub._getServiceClient(); Options opt = client.getOptions(); opt.setTimeOutInMilliSeconds(600000); opt.setManageSession(*true*); client.getServiceContext().getProperty(HTTPConstants.HEADER_COOKIE); Sample value of session id:JSESSIONID=61F54A15234AD93EB70F63B05DC0A6C1; This is all fine till here. Now if in the Login method the user authentication fails the session id which the server should sent to the client should be null , so that if the user tries to access my other business methods he should not be able to do that. Basically I need a way to control sessionId at the server only. Right now i am trying to set sessionId to null using this code snippet: MessageContext msgContext=MessageContext.*getCurrentMessageContext*(); SessionContext sessionContext=msgContext.getSessionContext(); sessionContext.setProperty(HTTPConstants. *HEADER_COOKIE*,*null*); msgContext.setSessionContext(sessionContext); But at my client i am still getting the sesssionId as not-nCan you please suggest a way of doing this. Thanks in advance. Amardeep Singh Khera --0016e6441f3a80eba4046952c465 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi All,
=A0
I am facing some problem in implementing se= ssion management while using axis2. It will be great if=A0anyone=A0can=A0he= lp me out with few queries.

My Scenario: The scenario which I am trying to = implement is very simple one. Basically I have a service implementation cla= ss which has a Login and couple of business methods. Now from a client when= I call Login method of the service I=A0 pass user name and pa= ssword. At the server my service class authenticate the user and sends resp= onse back to client with the session id. I am trying to implement transport= session so at client I am able to see session using this code snippet :

=A0

stub =3D = new MyStub(serviceUrl<= /i>);

client =3D <= span style=3D"FONT-SIZE: 10pt; COLOR: #0000c0; FONT-FAMILY: 'Courier Ne= w'">stub._getServiceClient();

Options opt =3D cl= ient.getOptions();

opt.setTimeOutInMilliSeconds(600000= );

opt.setManageSession(true);

client.getServiceContext().getPrope= rty(HTTPConstants.HEADER_COOKIE);

=A0

Sample value of session id:JSESSIONID=3D61F54A15234AD93EB70F63B05DC0A6C1;

=A0

This is all fine till here. Now if in the L= ogin method the user authentication fails the session id which the server s= hould sent to the client should be null , so that if the user tries to acce= ss my other business methods he should not be able to do that. Basically I = need a way to control sessionId at the server only.
Right now i = am trying to set sessionId to null using this code snippet:
=A0

MessageContext msgContext=3DMessageContext.getCurrentM= essageContext();

SessionContext sessionContext=3DmsgContext.getSessionCont= ext();

sessionContext.setProperty(HTTPConstants.

HEADER_= COOKIE
,null);=20

msgContext.setSessionContext(sessionContext);

=A0
But at my = client i am still getting the sesssionId as not-nCan you please suggest a w= ay of doing this.

=A0

Thanks in advance.

Amardeep Singh Khera

--0016e6441f3a80eba4046952c465--