WebServiceHandler classes are now WebServiceOutboundGateways. The "service-activator" element has also been replaced with <ws:outbound-gateway/> (INT-404).
This commit is contained in:
@@ -20,7 +20,7 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.integration.channel.MessageChannel;
|
||||
import org.springframework.integration.message.Message;
|
||||
import org.springframework.integration.message.MessageBuilder;
|
||||
import org.springframework.integration.ws.handler.AbstractWebServiceHandler;
|
||||
import org.springframework.integration.ws.AbstractWebServiceOutboundGateway;
|
||||
|
||||
/**
|
||||
* Demonstrating a web service invocation through a Web Service MessageHandler.
|
||||
@@ -41,7 +41,7 @@ public class WebServiceDemo {
|
||||
// Create the Message object
|
||||
// In this case the service expects a SoapAction header
|
||||
Message<String> message = MessageBuilder.withPayload(requestXml)
|
||||
.setHeader(AbstractWebServiceHandler.SOAP_ACTION_PROPERTY_KEY, "http://tempuri.org/FahrenheitToCelsius")
|
||||
.setHeader(AbstractWebServiceOutboundGateway.SOAP_ACTION_PROPERTY_KEY, "http://tempuri.org/FahrenheitToCelsius")
|
||||
.build();
|
||||
|
||||
// Send the Message to the handler's input channel
|
||||
|
||||
@@ -17,12 +17,13 @@
|
||||
|
||||
<channel id="fahrenheitChannel"/>
|
||||
|
||||
<!-- The service activator receives from the 'fahrenheitChannel', invokes the
|
||||
Web Service for the given URI, and sends the reply Message to the 'celsiusChannel'. -->
|
||||
<ws:service-activator id="temperatureConverter"
|
||||
input-channel="fahrenheitChannel"
|
||||
output-channel="celsiusChannel"
|
||||
uri="http://www.w3schools.com/webservices/tempconvert.asmx"/>
|
||||
<!-- The Web Service outbound Messaging Gateway receives from the
|
||||
'fahrenheitChannel', invokes the Web Service for the given URI,
|
||||
and sends the reply Message to the 'celsiusChannel'. -->
|
||||
<ws:outbound-gateway id="temperatureConverter"
|
||||
request-channel="fahrenheitChannel"
|
||||
reply-channel="celsiusChannel"
|
||||
uri="http://www.w3schools.com/webservices/tempconvert.asmx"/>
|
||||
|
||||
<!-- The response from the service is logged to the console. -->
|
||||
<stream:stdout-channel-adapter id="celsiusChannel"/>
|
||||
|
||||
Reference in New Issue
Block a user