Results 1 to 4 of 4

Thread: outboundChannelAdapter- RC2

  1. #1
    Join Date
    Sep 2008
    Location
    Mannheim,Germany
    Posts
    125

    Default outboundChannelAdapter- RC2

    Hello,

    I have a WS OutboundGateway where the response from the webservice is basically sent to a method in a class. Is there a way how this method can receive the response?? Please find below a snippet of my config. Would appreciate help.

    Code:
    <ws:outbound-gateway id="gateway" request-channel="requestChannel" reply-channel="replyChannel" uri="http://localhost:8080/SpringWebServiceGID/"/>
    
    <!--Response from Web Service:fetched data is send to the method-->
    <outbound-channel-adapter channel="replyChannel" ref="replybean" method="receive"/>
    <beans:bean id="replybean" class="integration.GIDIntegration"/>

    public Message<String> receive(){

    //Dont know how to receive the webservice response here
    }

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

    Default

    You need to provide a method that accepts an argument (either Message or Message payload). It's just like a void-returning service-activator method.
    Code:
    public void receive(Message<?> message) {...}

  3. #3
    Join Date
    Sep 2008
    Location
    Mannheim,Germany
    Posts
    125

    Default

    Hi Mark, Thanks for the response. I agree that the response can be received as an argument but would tht just be enough or should there be any change in the beans config as well?
    Code:
    <beans:bean id="replybean" class="integration.GIDIntegration"/>

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

    Default

    That should be sufficient if that bean can in fact be created without any constructor arguments or properties.

Posting Permissions

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