2 Replies Latest reply on May 21, 2008 10:32 AM by Janne Mattila

    How should I implement web service wrappers?

    Janne Mattila Newbie

      I want to wrap a number of web services so that they would be called throught JBossESB. When client wants to call web service X, he would instead be calling the same web service interface on ESB. ESB then routes the request to the actual web service and the response back to the client.

      client <--> web service (esb) <--> web service (remote)

      The motivation is to make it possible to add esb actions such as logging and security things later.

      How should I best implement this? I have looked at the webservice_producer and webservice_consumer quickstarts. based on those I believe idea would be

      client <--> SOAPProcessor (esb action) <--> SOAPClient (esb action) <--> web service (remote)

      Is this the way to go? Are simpler options? I think I have to manually create a thin wrapper web service class for each service I am using (as in webservice_producer), is this true, can't I avoid this?

      Ideally I would like to pass the soap messages that are coming from the client, to the remote web service (and vice versa) unaltered without any transformations, or any configuration for mapping the contents into other types of messages.

        • 1. Re: How should I implement web service wrappers?
          Tom Fennelly Master

          I don't think you'll be able to do this using either the SOAPProcessor or the SOAPClient. We don't really have anything for this in the ESB at the moment, other than the existing Content Based Routing actions. Problem there is that (AFAIK), these can only route to ESB Aware endpoints i.e. the can't route to e.g. an external WS endpoint.

          IMO, I think a SOAP Proxy Gateway would be the best solution for this. There are no actions etc. The proxy gateway is configured with a set of CBR rules and endpoints and it just filters the SOAP requests to the WS endpoints based on these rules.

          • 2. Re: How should I implement web service wrappers?
            Janne Mattila Newbie

            What if I

            - configure a http listener
            - route messages coming in from that listener to SOAPClient action
            - SOAPClient action calls an external web service
            - route responses from SOAPClient back to the http listener (not sure how this is done? but similar is done in quickstart webservice-producer, right?)

            Wouldn't this implement the wrapper I am looking for?