[
https://issues.apache.org/jira/browse/AXIS2-2042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472730
]
Sudhakar reddi commented on AXIS2-2042:
---------------------------------------
Hi,
For the above sample I created reated an RPC client and tested. It is working
very well with Browsers but It is not working with Java RPC client. also I
took latest jars and axis2.war file from above links.
Is there any thing wrong with my client code. Please see the code below.
---------------------------------------------------------------------------------------------------------
RPCServiceClient serviceClient = new RPCServiceClient();
Options options = serviceClient.getOptions();
EndpointReference targetEPRtest = new
EndpointReference("http://127.0.0.1:8080/axis2/services/TestService");
options = serviceClient.getOptions();
options.setTo(targetEPRtest);
options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
options.setManageSession(true);
options.setAction("urn:plusone");
QName opFindEntry = new QName("http://service.test.com/xsd", "plusone");
Object[] opFindEntryArgs = new Object[] { };
Class[] returnTypes = new Class[] { Integer.class};
Object[] response = serviceClient.invokeBlocking(opFindEntry,opFindEntryArgs,
returnTypes);
Integer result = (Integer) response[0];
System.out.println("No entry found for " + result);
response = serviceClient.invokeBlocking(opFindEntry,opFindEntryArgs,
returnTypes);
result = (Integer) response[0];
System.out.println("No entry found for " + result);
--------------------------------------------------------------------------------------------------------
Your help will be highly appreciated.
Regards
Sudhakar
> Axis2 1.1.1 session works fine in browser but doesn't work in Stub client
> -------------------------------------------------------------------------
>
> Key: AXIS2-2042
> URL: https://issues.apache.org/jira/browse/AXIS2-2042
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: client-api
> Affects Versions: 1.1.1
> Environment: Axis2 1.1.1, JDK 1.5, Windows XP
> Reporter: sam zhou
> Assigned To: Deepal Jayasinghe
> Fix For: 1.1.1
>
> Attachments: Axis2 MySessionService.zip
>
>
> I developed the following sample code using Axis 2 with session management.
> The service is very simple, it has a single method called plusone(). Whenever
> you call plusone() with session enabled, it will return counter++. The
> counter is initialized to 0 in init() and stored in session.
>
> I believe the server side code works fine, because after I deployed
> MySessionService.aar, if I use my browser to refresh
> http://localhost:8080/axis2/rest/MySessionService/plusone
>
> It will return 1, 2, 3, 4, 5, 6, etc.
>
> However, in my Stub client test code, even if I coded
>
> stub._getServiceClient().getOptions().setManageSession(true);
>
> All the 3 direct stub.plusone() calls only return 1, 1, 1 instead of 1, 2, 3.
>
> Attached are source codes in zip file. If you want to regenerate codes from
> scratch, please use README.TXT. All the codes should work fine in Eclipse
> 3.2.1 except I removed libraries of Axis2 and JUnit.
> Please note I set the session scope to transport session in service.xml.
> Thanks, Sam.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]