4 Replies Latest reply on Dec 14, 2010 8:57 AM by Scale It

    EBWS and ServiceInvoker problem

    Scale It Newbie

      I encountered a problem that EBWS tries to build the soap response before the service pipeline completes.

       

      This is the setup:

       

      A service (A) is exposed as an EBWS. One of its actions invokes another service (B) using ServiceInvoker.deliverSync(msg, timeout). It appears that EBWS tries to build the soap response once the service B pipeline completes, before the service A pipeline completes.

       

      Am I wrong in assuming that since its service A that is exposed as an EBWS the soap response should not be built before the service A pipeline completes?

       

       

      (Im using jboss esb 4.3).

        • 1. Re: EBWS and ServiceInvoker problem
          Keith Babo Master

          The pipeline of service A will complete before returning to the client if you are using sendSync to invoke service B.  Can you elaborate on what leads you to believe that service A is returning before service B returns?  Do you see any errors in your log during the invocation?

          • 2. Re: EBWS and ServiceInvoker problem
            Scale It Newbie

            A does not complete before B. When B completes further actions are performed on A - the last action in A is meant to set a default Message that can be picked up by EBWS and used as payload for the soap response. But unfortunately when B completes the soap response is built using the default Message on pipeline B as soap response payload. I attached a debugger to ServiceInvoker and tried stepping though the code - it appears EBWS response was triggered prematurely by a filter class when B completed. I can't check the error msg right now but it amounted to saying that building the soap msg failed because the Message didn't have a xml document root at position 1:1. This is because the default Message on pipeline B is just a number - not XML.

             

            If I remove the action containing the ServiceInvoker.deliverSync() from Service A then EBWS uses the default Message on pipeline A as soap response payload when A completes as expected.

            • 3. Re: EBWS and ServiceInvoker problem
              Kevin Conner Master

              Sounds as if you may be reusing the current message without initialising the call header, as such it will still refer to the ReplyTo for service A.

               

              Either create a new message or, if you must reuse the current one, set the reply to to null.

               

              Call call = message.getHeader().getCall();

              call.setReplyTo(null);

              • 4. Re: EBWS and ServiceInvoker problem
                Scale It Newbie

                Thanks that was it.