You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Deepal Jayasinghe (JIRA)" <ji...@apache.org> on 2009/06/07 20:18:07 UTC

[jira] Commented: (AXIS2-4361) Problem in transportsession on the client side AXIS 2 1.3 JDK 1.6

    [ https://issues.apache.org/jira/browse/AXIS2-4361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12717068#action_12717068 ] 

Deepal Jayasinghe commented on AXIS2-4361:
------------------------------------------

Could you please check with latest version of Axis2 and see whether you still have the problem.

Thank you!
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.