Announcement Announcement Module
Collapse
No announcement yet.
soap over jms to webservice Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • soap over jms to webservice

    Hi All,


    I am using message-driven-channel-adapter with channel to consume the messages on ActiveMQ queue, but what I want is that when a messages arrives on the queue it should invoke a webservice passing that message to the webservice.

    I guess this can be achieved by using SimpleWebServiceOutboundGateway ?

    I am a newbie to Spring Integration, any help or link will be appreciated.

    Thanks
    Last edited by abdullah_shaikh; Jun 5th, 2009, 06:09 AM.

  • #2
    This should do the trick:
    Code:
    <jms:message-driven-channel-adapter ... channel="x"/>
    
    <ws:outbound-gateway request-channel="x"
                         uri="http://someWebService"
                         reply-channel="y"/>
    Last edited by Mark Fisher; Jun 5th, 2009, 08:35 AM.

    Comment


    • #3
      Thanks for the reply, Mark.


      But I have some queries regarding this :

      input-channel - this is the channel where the messages comes from the queue.
      uri - points to webservice

      output-channel - ?

      what does the output-channel does ?. I believe the input-channel provides the messages that needs to be sent to the webservice or do I need to configure the output-channel for webservice ?.

      Bit confused

      Thanks

      Comment


      • #4
        The 'output-channel' is where the Web Service response will be sent. (note: edited the example to correctly show that the gateway uses 'request-channel' and 'reply-channel').
        Last edited by Mark Fisher; Jun 5th, 2009, 08:36 AM.

        Comment


        • #5
          Sorry, for the gateway (since input/output becomes confusing when referring to a service to be invoked), it is actually 'request-channel' for the Web Service request and 'reply-channel' for the Web Service response:
          Code:
          <ws:outbound-gateway uri="http://someWebService"
                               request-channel="x"
                               reply-channel="y"/>
          (editing the example above).

          -Mark

          Comment


          • #6
            For more examples... without my typos and a more thorough explanation, please refer to the "Web Services" chapter of the Spring Integration reference manual:
            http://static.springframework.org/sp...erence.html#ws

            Comment


            • #7
              Thanks for all the help, just 1 more question.

              Instead of using message-driven-channel-adapter and then forwarding the message to the web service using outbound-gateway, can I create a web service which directly listens to the queue ?

              I guess I need to use WebServiceMessageListener for this ?

              I know this question is related to Spring Web Services , I have posted this on web services forum but haven't got any reply yet.

              Thanks

              Comment


              • #8
                Yes, if you are simply trying to use JMS as a transport for invoking a Web Service, then you should consider using Spring Web Services' support for that. This section of the SWS reference manual should help:
                http://static.springsource.org/sprin...ent-transports

                Comment


                • #9
                  Spring Integration - Integration our Webservice

                  Hi Mark ,

                  We are trying to integrate our spring application with our Spring webservice through SI , We did as follows In our transformer we just transform our requestObject to transfer to xml payload , we did as follows


                  fyi , We deployed our webservice in IBM apps server.

                  When we tried to get the response , we are getting as follows
                  org.springframework.integration.message.MessageHan dlingException: error occurred in message handler [org.springframework.integration.ws.SimpleWebServic eOutboundGateway@1c4f0f8]


                  Please advice me ...


                  Param

                  Comment

                  Working...
                  X