axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From João Conceição (JIRA) <>
Subject [jira] [Created] (AXIS2-5097) Axis2 problem with concurrent requests mismatch response object
Date Thu, 21 Jul 2011 12:07:58 GMT
Axis2 problem with concurrent requests mismatch response object

                 Key: AXIS2-5097
             Project: Axis2
          Issue Type: Bug
          Components: databinding
    Affects Versions: 1.6.0, 1.2
         Environment: Tomcat 5.5.25 for the application server
Axis2 1.2 or 1.6 for the Web Service
Java version 1.5.0_11
            Reporter: João Conceição
            Priority: Critical

I'm facing a problem on my production server for a Web Service with concurrent requests.

The problem is that when the Web Service receives (for instance) two requests for two different
methods (each method returning a different object) in the same service, the Web Service will
return the object type of the second request.

To replicate and simplify the problem I create a simple Web Service with only one service
and two methods with the same environment of the production server.


package test;

import beans.Request1Response;
import beans.Request2Response;

public class RequestMethods {

    public Request1Response request1() {
        Request1Response output = new Request1Response();

        try {
            Thread.sleep(10 * 1000);
        } catch (InterruptedException e) {


        return output;

    public Request2Response request2() {
        Request2Response output = new Request2Response();


        return output;



<service name="RequestMethods">
        Concurrent Requests test
        <messageReceiver mep="" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"
        <messageReceiver  mep=""  class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
    <parameter name="ServiceClass" locked="false">test.RequestMethods</parameter>

I've made a request for request1 and before this one returns, made another request for request2.

The result for request1 (the first request but the second obtained response because of the
sleep of 10 seconds) was:

<soapenv:Envelope xmlns:soapenv="">
      <ns:request2Response xmlns:ns="http://test/xsd">
            <error_code xmlns="http://beans/xsd">1</error_code>
            <error_msg xmlns="http://beans/xsd">message1</error_msg>

The result for request2 (the second request but the first obtained response) was:

<soapenv:Envelope xmlns:soapenv="">
      <ns:request2Response xmlns:ns="http://test/xsd">
            <error_code xmlns="http://beans/xsd">2</error_code>
            <error_msg xmlns="http://beans/xsd">message2</error_msg>

As you can see above, the response for request1 it should be of type request1Response but
it's from request2Response instead.

João Conceição

This message is automatically generated by JIRA.
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message