Results 1 to 9 of 9

Thread: soap over jms to webservice

  1. #1

    Question 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 at 05:09 AM.

  2. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,853

    Default

    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 at 07:35 AM.

  3. #3

    Default

    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

  4. #4
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,853

    Default

    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 at 07:36 AM.

  5. #5
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,853

    Default

    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

  6. #6
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,853

    Default

    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

  7. #7

    Default

    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

  8. #8
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,853

    Default

    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

  9. #9

    Default 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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •