Announcement Announcement Module
No announcement yet.
soap over jms to webservice Page Title Module
Move Remove Collapse
Conversation Detail Module
  • 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.

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

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


    • #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



      • #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.


        • #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:
          <ws:outbound-gateway uri="http://someWebService"
          (editing the example above).



          • #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:


            • #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.



              • #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:


                • #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 [ eOutboundGateway@1c4f0f8]

                  Please advice me ...