[ https://issues.apache.org/jira/browse/AXIS2-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718252#action_12718252 ]
Deepal Jayasinghe commented on AXIS2-4361: ------------------------------------------ I can understand the problem :) It is because client side session works if you use the same service client for throughout the invocations. In your case as I can see that is not the case, for each request you have new service client. Try to using the same service client. Thanks, Deepal > Problem in transportsession on the client side AXIS 2 1.3 JDK 1.6 > ----------------------------------------------------------------- > > Key: AXIS2-4361 > URL: https://issues.apache.org/jira/browse/AXIS2-4361 > Project: Axis 2.0 (Axis2) > Issue Type: Bug > Affects Versions: 1.3 > Environment: WIndows XP SP3, > Reporter: Asit Jaiswal > Attachments: Addition.java, services.xml, Support.java > > Original Estimate: 96h > Remaining Estimate: 96h > > Using Axis2 1.3 > Java 6 > I have created one web service which adds two number but the session is not > working when using serlvet as client > : here is the listing for web service: > public class Addition{ > public int add(int n1 ,int n2){ > MessageContext mctx = MessageContext.getCurrentMessageContext(); > ServiceContext serviceContext = mctx.getServiceContext(); > if((Integer) serviceContext.getProperty("VALUE") == null){ > serviceContext.setProperty("VALUE", new Integer(n1+n2)); > return((Integer) serviceContext.getProperty("VALUE")).intValue(); > } > else{ > serviceContext.setProperty("VALUE1", (Integer) > serviceContext.getProperty("VALUE")); > int result = ((Integer) > serviceContext.getProperty("VALUE1")).intValue()+((Integer) serviceContext. > getProperty("VALUE")).intValue(); > serviceContext.setProperty("VALUE", (Integer) result); > return result; > } > } > } > I modified the services.xml as : > <service name="Addition" scope="transportsession" > > ...... > ..... no modification here > ..... > </service> > For client Side I created a Servlet using AXIOM here is the listing > Options opts = new Options(); > opts.setTo(new > EndpointReference("http://localhost:8080/Calculator/services/Addition")); > opts.setAction("urn:add"); > opts.setManageSession(true); > sc.setOptions(opts); > If I invoke the web service using below url transport session is working fine > http://localhost:8080/Calculator/services/Addition/add?n1=5&n2=9 > but using the AXIOM in servlet its not working (transport session) > Note:(if I Put scope="application" then it working with Servlet) > Please help me............ > Thanks in Advance -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.