Announcement Announcement Module
Collapse
No announcement yet.
WS adapter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

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

    Comment


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

      Comment


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

        Comment


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

          Comment


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

            Comment


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

              Comment


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

                Comment


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

                  Comment

                  Working...
                  X