public class WebServiceDemoTestApp {
public static void main(String[] args) {
ClassPathXmlApplicationContext context =
new ClassPathXmlApplicationContext("/META-INF/spring/integration/temperatureConversion.xml");
DestinationResolver<MessageChannel> channelResolver = new BeanFactoryChannelResolver(context);
// Compose the XML message according to the server's schema
String requestXml =
"<FahrenheitToCelsius xmlns=\"http://www.w3schools.com/webservices/\">" +
"<Fahrenheit>90.0</Fahrenheit>" +
"</FahrenheitToCelsius>";
// Create the Message object
Message<String> message = MessageBuilder.withPayload(requestXml).build();
// Send the Message to the handler's input channel
MessageChannel channel = channelResolver.resolveDestination("fahrenheitChannel");
channel.send(message);
}