Merge pull request #42 from ghillert/INTSAMPLES-56
INTSAMPLES-56 Update README.md for ws-outbound-gateway sample
This commit is contained in:
@@ -14,4 +14,7 @@ A very simple example that show you how easy it is to invoke a SOAP based servic
|
|||||||
* The *WS Outbound Gateway* converts the Message to a SOAP request and sends it to a remote service, which converts a temperature from
|
* The *WS Outbound Gateway* converts the Message to a SOAP request and sends it to a remote service, which converts a temperature from
|
||||||
Fahrenheit to Celsius and the result is printed to the console.
|
Fahrenheit to Celsius and the result is printed to the console.
|
||||||
|
|
||||||
To run sample simply execute **WebServicesDemoTest**
|
To run the sample simply execute **WebServiceDemoTestApp** in package *org.springframework.integration.samples.ws*. You can also execute that class using the [Exec Maven Plugin](http://mojo.codehaus.org/exec-maven-plugin/):
|
||||||
|
|
||||||
|
$ mvn clean package exec:java
|
||||||
|
|
||||||
|
|||||||
@@ -62,6 +62,14 @@
|
|||||||
<showDeprecation>false</showDeprecation>
|
<showDeprecation>false</showDeprecation>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>1.2</version>
|
||||||
|
<configuration>
|
||||||
|
<mainClass>org.springframework.integration.samples.ws.WebServiceDemoTestApp</mainClass>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<repositories>
|
<repositories>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2010 the original author or authors.
|
* Copyright 2002-2012 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package rg.springframework.integration.samples.ws;
|
package org.springframework.integration.samples.ws;
|
||||||
|
|
||||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||||
import org.springframework.integration.Message;
|
import org.springframework.integration.Message;
|
||||||
@@ -27,13 +27,13 @@ import org.springframework.integration.support.channel.ChannelResolver;
|
|||||||
* Demonstrates a web service invocation through a Web Service outbound Gateway.
|
* Demonstrates a web service invocation through a Web Service outbound Gateway.
|
||||||
* A header-enricher provides the Soap Action prior to invocation. See the
|
* A header-enricher provides the Soap Action prior to invocation. See the
|
||||||
* 'temperatureConversion.xml' configuration file for more detail.
|
* 'temperatureConversion.xml' configuration file for more detail.
|
||||||
*
|
*
|
||||||
* @author Marius Bogoevici
|
* @author Marius Bogoevici
|
||||||
*/
|
*/
|
||||||
public class WebServiceDemoTestApp {
|
public class WebServiceDemoTestApp {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
ClassPathXmlApplicationContext context =
|
ClassPathXmlApplicationContext context =
|
||||||
new ClassPathXmlApplicationContext("/META-INF/spring/integration/temperatureConversion.xml");
|
new ClassPathXmlApplicationContext("/META-INF/spring/integration/temperatureConversion.xml");
|
||||||
ChannelResolver channelResolver = new BeanFactoryChannelResolver(context);
|
ChannelResolver channelResolver = new BeanFactoryChannelResolver(context);
|
||||||
|
|
||||||
@@ -50,5 +50,5 @@ public class WebServiceDemoTestApp {
|
|||||||
MessageChannel channel = channelResolver.resolveChannelName("fahrenheitChannel");
|
MessageChannel channel = channelResolver.resolveChannelName("fahrenheitChannel");
|
||||||
channel.send(message);
|
channel.send(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user