4 Replies Latest reply on Apr 1, 2011 8:30 PM by joe_boy12

    Webservice to ESB Service[s] synchronous communication

    ShravanKumar Raju Newbie

      Hello everyone,

      Am looking for the best possible solution to achieve the JBOSS-WS to JBOSS esb(using jboss soa suite, both are running on same AS).

       

      in my scenario where in WS adapater will forward esb  message(converted one) to ESB Service for processing using  ServiceInvoker.

      I wonder how a processed esb message(message will  go thru atleast 4 dfferent service invocations) back in the webservice  code, so that SOAP response can be prepared and send back to webservice  aware client.?

       

      Note : using EBWS is's pretty straight forward, whenever we return the message, message will be send back to client using it's own gateway(http).

       

      all service transitions happen using ServiceInvoker in asynchronous mode[do you suggest any alternative way from service to service like using EPR?)

      Step-1 : WS1(Router) ->

      Step -2: ESB Service1

      Step- 3: ESB Service2

      Step- 4: ESB Service3

      Step-5:---> WS1(router)(same webservice router from which the message actually received) - it need's to be acheived

       

      here the step-2 to step-4 is already implemented, now am just trying to expose a WebService /HTTPs with some mere configuration changes.

      and WS1 also implemented. below is the sample code of JBOSS-WS

       

      @WebService(name = "Provisioning", targetNamespace = "http://motorola.com/oss/sag")

      @SOAPBinding(style = SOAPBinding.Style.DOCUMENT)

      public class HTTPSConnector

      {

       

          @WebMethod

          @WebResult(name="SPResponseMessage")   

          public String sendSPR(@WebParam(name = "SPRequestMessage") String spr)

          {

              try{       

                      Message factoryMessage = MessageFactory.getInstance().getMessage();

                      factoryMessage.getBody().add(spr);

                      System.out.println("factory message sent to test:test");

                      new ServiceInvoker("test", "test").deliverAsync(factoryMessage);

      // processed message is expected to send back to ws client whoever sends the message

       

              }

              catch(Exception e){

              e.printStackTrace();

              }

       

              return null;

              //return "Hello '" + spr + "' on " + new java.util.Date();

          }

       

      }

       

       

      Regards,

      -Shravan