Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 59828 invoked from network); 22 Mar 2004 12:21:30 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 22 Mar 2004 12:21:30 -0000 Received: (qmail 40210 invoked by uid 500); 22 Mar 2004 12:21:25 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 40109 invoked by uid 500); 22 Mar 2004 12:21:24 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 40097 invoked from network); 22 Mar 2004 12:21:24 -0000 Received: from unknown (HELO exchange.sun.com) (192.18.33.10) by daedalus.apache.org with SMTP; 22 Mar 2004 12:21:24 -0000 Received: (qmail 6457 invoked from network); 22 Mar 2004 12:21:58 -0000 Received: from localhost (HELO nagoya) (127.0.0.1) by nagoya.betaversion.org with SMTP; 22 Mar 2004 12:21:58 -0000 Message-ID: <1389207611.1079958118202.JavaMail.apache@nagoya> Date: Mon, 22 Mar 2004 04:21:58 -0800 (PST) From: jira@apache.org To: axis-dev@ws.apache.org Subject: [jira] Commented: (AXIS-986) Can't share sessions between different services ?? Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N The following comment has been added to this issue: Author: Davanum Srinivas Created: Mon, 22 Mar 2004 4:20 AM Body: Perman, Sorry for the HUGE delay in reviewing this patch. Do you still need this support in next version of axis? Is it possible to rework the patch to work with latest CVS? thanks, dims --------------------------------------------------------------------- View this comment: http://issues.apache.org/jira/secure/ViewIssue.jspa?key=AXIS-986&page=comments#action_26442 --------------------------------------------------------------------- View the issue: http://issues.apache.org/jira/secure/ViewIssue.jspa?key=AXIS-986 Here is an overview of the issue: --------------------------------------------------------------------- Key: AXIS-986 Summary: Can't share sessions between different services ?? Type: Bug Status: Reopened Project: Axis Components: Basic Architecture Versions: 1.1rc2 Assignee: Axis Developers Mailing List Reporter: Tristan B. Created: Tue, 5 Aug 2003 9:13 AM Updated: Mon, 22 Mar 2004 4:20 AM Environment: Operating System: Windows NT/2K Platform: PC Description: Hi everybody, I've been trying lately to share a session between two distinct axis web services. I am using client generated classes (with WSDL2Java) and the default hhtp cookie based session management. Here is how I proceeded : 1) I invoke the first XXX service : XXXService firstService = new XXXServiceLocator(); XXX firstServiceRet = firstService.getXXX(new java.net.URL(...)); ((XXXSoapBindingStub)firstServiceRet).setMaintainSession(true); firstServiceRet.XXX(...) //invoke the service Note the use of the setMaintainSession method : this sets the Stub and the MessageContext maintainSession property to true. When getting back the response from the axis server, if this property is set to true, axis retrieves the cookie header from the response and stores it in the MessageContext : msgContext.setProperty(HTTPConstants.HEADER_COOKIE, cookie); (see org.apache.axis.transport.http.HTTPSender for details ...) 2) Then here is how I retrieve the cookie after the call to the XXX Service : Call XXXCall = ((org.apache.axis.client.axis.Service)firstService).getCall(); org.apache.axis.MessageContext msgContext = XXXCall.getMessageContext(); String cookie = msgContext.getStrProp(HTTPConstants.HEADER_COOKIE); This works fine ... checked it with TCPMon ... get the real cookie ... 3) I invoke the second YYY service: YYYService secondService = new YYYServiceLocator(); YYY secondServiceRet = secondService.getYYY(new java.net.URL(...)); ((YYYSoapBindingStub)firstServiceRet).setMaintainSession(true); Here again, if maintainSession is set to true, the writeToSocket method will retrieve the cookie from the messageContext (String cookie = msgContext.getStrProp(HTTPConstants.HEADER_COOKIE)) and put it into the http header request. My idea here was thus to put the cookie retrieved from the first XXXCall into the messageContext of the second YYY Call object before invoking it. The problem is that when invoking the call: YYYCall.invoke(...) (this is done in the YYYSoapBindingStub class), the invoke metod calls the reset method of the messageContext and the cookie information is lost !! (MessageContext.bag is cleared) (see org.apache.axis.client.Call). Is there a way of passing the cookie to the second Call without modifying axis code ?? If not, it wouldn't require much code modifications to allow setting a cookie in a call and thus allow Session Sharing. I think session sharing between different services is an important feature. This is an important issue !!! Any help would be greatly appreciated !!! Thanks ... PS: by the way, this method of passing the cookie from service to service works perfectly with a .NET client ! --------------------------------------------------------------------- JIRA INFORMATION: This message is automatically generated by JIRA. If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira