Results 1 to 9 of 9

Thread: WS adapter

  1. #1
    Join Date
    Mar 2008
    Posts
    8

    Default WS adapter

    I see that from 1.0.0.M3 there should be support for implementing webservice adapters. Actually I can't find in the Spring Integration jar files the SimpleWebServiceTargetAdapter class that is mentioned in the documentation. By the way, could you please provide a WS adapter sample?

    Levente

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

    Default

    The Web Service adapters are in a separate JAR file that was introduced in 1.0.0.M3: "spring-integration-ws.jar".

    We will provide a sample in M4, and at that time we will be able to demonstrate the source side as well. I opened this issue if you would like to vote and/or watch: http://jira.springframework.org/browse/INT-197

    -Mark

  3. #3
    Join Date
    Apr 2008
    Posts
    9

    Default WS Target Adapter error

    I keep getting the error:

    org.springframework.integration.message.MessageHan dlingException: Unable to determine reply channel for message. Provide a 'replyChannel' or 'replyChannelName' in the message header or a 'defaultOutputChannelName' on the message endpoint.

    However, in my endpoint I have:

    <endpoint input-channel="wstarget1" handler-ref="chain" default-output-channel="routing"/>

    <handler-chain id="chain" >
    <handler ref="transformationService"/>
    <handler ref="defaultWSTargetCall1"/>
    </handler-chain>

    <ws-target id="defaultWSTargetCall1" channel="wstarget1" uri="http://something"/>

    Shouldn't this pick up routing as the next channel, given what's in the endpoint?

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

    Default

    Do you have an explicitly configured channel named "routing". The error message you are seeing could also be a result of the channel not being discovered in the channelRegistry.

  5. #5
    Join Date
    Apr 2008
    Posts
    9

    Default

    Yes, routing is configured as an explicit channel in the xml. It is also referred to in an annotation for a Router bean I've created. I have other similar endpoints, that are made up of simple MessageHandlers (i.e. non adapters) and they correctly use the default output of routing - it seems when the adapter is involved, then the default output of 'routing' is lost somewhere.

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

    Default

    After looking at this again, I realized what's happening. I will try to explain (let me know if I need to clarify). The "defaultWSTargetCall1" is a target adapter, and the bus will create a subscription for that adapter to be listening on the channel "wsTarget1". You also created an endpoint with a handler chain that will be subscribed to "wsTarget1". Essentially, you have created a scenario where your explicitly defined <endpoint/> and the "defaultWSTargetCall1" by itself are acting as "competing consumers".

    The error that you are seeing about the failure to resolve a reply channel is actually related to the reply *from* the Web Service call. You need to make sure that the message you are sending to the "wstarget1" channel has a 'returnAddress' in its MessageHeader (channel reference or a channel-name) or that the <endpoint/>you have defined contains a "default-output-channel" attribute.

    Interestingly, this highlights something that might be refactored shortly (today or tomorrow). Namely, the "ws-target" (or any "*-target" for that matter) should probably only create the handler itself rather than a subscribed endpoint (which it does now). Based on this issue, I assume that you would be in favor of such a refactoring as providing a more intuitive model?

    Thanks,
    Mark

  7. #7
    Join Date
    Apr 2008
    Posts
    9

    Default

    Thanks for that Mark, I believe you're right. I would be in favour of such a change. In the current incarnation, however, does that mean I can't use the handler chain to refer to the ws-target as a handler only? I ask that because it seems that 'channel' is a mandatory attribute for the ws-target.

  8. #8
    Join Date
    Mar 2007
    Posts
    16

    Default

    Hi Mark and Crew,

    It sounds like the web services channel adapter is undergoing a few more changes at the moment. Is there any chance of a simple example using the ws adapter appearing before the M4 release? I am currently having issues receiving a response from my web service using the nightly builds since the M3 release.

    We will provide a sample in M4, and at that time we will be able to demonstrate the source side as well. I opened this issue if you would like to vote and/or watch: http://jira.springframework.org/browse/INT-197
    Thanks,

    Brad

  9. #9
    Join Date
    Oct 2007
    Location
    Toronto, ON
    Posts
    90

    Default

    Brad,

    As the M4 release date is closing, a sample will be available about the same time.
    Meanwhile, can you provide a bit more detail about the issues you're encountering with the adapter?

    Thanks,
    Marius
    Marius Bogoevici,
    Spring Integration Committer

Posting Permissions

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