4 Replies Latest reply on Oct 22, 2010 2:06 PM by dyamazon

    Incorrect web service called when multiple one-way services deployed

    dyamazon Newbie

      Hi!

       

      I have a situation where I have two classes, each implementing a one-way (asynch) web service similar to below:

       

      @WebService()

      public class TestService1 {

       

           @WebMethod()

           @Oneway()

           public void runDiff(@WebParam(name="environment" String env) {

           }

      }

       

      If I deploy these two services under the same web application and then create a client application (using wsimport to generate the client stubs), when exercising the services occasionally (and randomly) the wrong service will be called. For instance, in a loop which executes svc1 and then 10 iterations of svc2 some of the svc2 invocations will actually be bassed by the web server to svc1.

       

      We are using JBOSS 6.0.0.201000429-M3 and jbossws-cxf-3.3.1.GA.

       

      Is this a known issue with one way services or are we doing something wrong?

        • 1. Re: Incorrect web service called when multiple one-way services deployed
          dyamazon Newbie

          Attached are the Eclipse projects to duplicate this issue, one for the web services and one for the client test app. If you run these you'll see output similar to below....


          Client output:

           

          Calling Svc 1

          Svc 1 Call Complete

          Calling Svc 2

          Svc 2 Call Complete

          Calling Svc 2

          Svc 2 Call Complete

          Calling Svc 2

          Svc 2 Call Complete

          Calling Svc 2

          Svc 2 Call Complete

          Calling Svc 2

          Svc 2 Call Complete

           

          Server output:

           

          [6.0.0.20100429-M3 "Neo"] Started in 2m:26s:986ms

          09:32:56,131 INFO  [STDOUT] ### TestOneWayService:TestService1:runDiff starting

          09:32:56,131 INFO  [STDOUT] ### TestOneWayService:TestService2:runDiff starting

          09:32:56,131 INFO  [STDOUT] ...do something in Svc 1 here...

          09:32:56,131 INFO  [STDOUT] ...do something in Svc 2 here...

          09:32:56,131 INFO  [STDOUT] Svc 1 :env1:sys1:srv1:subsys1:

          09:32:56,131 INFO  [STDOUT] Svc 2 :env2:sys2:srv2:subsys2:

          09:32:56,131 INFO  [STDOUT] ### TestOneWayService:TestService1:runDiff ending

          09:32:56,131 INFO  [STDOUT] ### TestOneWayService:TestService2:runDiff ending

          09:33:55,990 INFO  [STDOUT] ### TestOneWayService:TestService2:runDiff starting

          09:33:55,990 INFO  [STDOUT] ...do something in Svc 2 here...

          09:33:55,990 INFO  [STDOUT] Svc 2 :env2:sys2:srv2:subsys2:

          09:33:55,990 INFO  [STDOUT] ### TestOneWayService:TestService2:runDiff ending

          09:34:56,006 INFO  [STDOUT] ### TestOneWayService:TestService2:runDiff starting

          09:34:56,006 INFO  [STDOUT] ...do something in Svc 2 here...

          09:34:56,006 INFO  [STDOUT] Svc 2 :env2:sys2:srv2:subsys2:

          09:34:56,006 INFO  [STDOUT] ### TestOneWayService:TestService2:runDiff ending

          09:35:56,022 INFO  [STDOUT] ### TestOneWayService:TestService2:runDiff starting

          09:35:56,022 INFO  [STDOUT] ...do something in Svc 2 here...

          09:35:56,022 INFO  [STDOUT] Svc 2 :env2:sys2:srv2:subsys2:

          09:35:56,038 INFO  [STDOUT] ### TestOneWayService:TestService2:runDiff ending

          09:36:56,039 INFO  [STDOUT] ### TestOneWayService:TestService1:runDiff starting

          09:36:56,039 INFO  [STDOUT] ...do something in Svc 1 here...

          09:36:56,039 INFO  [STDOUT] Svc 1 :env2:sys2:srv2:subsys2:

          09:36:56,039 INFO  [STDOUT] ### TestOneWayService:TestService1:runDiff ending

           

          Note the error condition above in red....service 1 is invoked when the client called service 2. If you run it long enough you can see the case of service 2 being invoked for service as well, as shown below:

           

          09:38:58,633 INFO  [STDOUT] ### TestOneWayService:TestService2:runDiff starting

          09:38:58,633 INFO  [STDOUT] ...do something in Svc 2 here...

          09:38:58,633 INFO  [STDOUT] Svc 2 :env1:sys1:srv1:subsys1:

          09:38:58,633 INFO  [STDOUT] ### TestOneWayService:TestService2:runDiff ending

          • 2. Re: Incorrect web service called when multiple one-way services deployed
            Alessio Soldano Master

            I think the issue you're seeing here is https://jira.jboss.org/browse/JBWS-3060 . Can you please try with JBossWS-CXF 3.4.0.CR1, as this should have been fixed since 3.4.0.Beta1 ?

            • 3. Re: Incorrect web service called when multiple one-way services deployed
              dyamazon Newbie

              I will verify with the CR1 build as soon as possible and post results back here.

              • 4. Re: Incorrect web service called when multiple one-way services deployed
                dyamazon Newbie

                Using the code from the 3.4.0 CR1 release it appears that this behaviour has been fixed.