Reworked echo sample to use maven for clients
This commit is contained in:
@@ -87,11 +87,13 @@ public class EchoClient {
|
||||
SOAPBodyElement echoResponseElement = (SOAPBodyElement) message
|
||||
.getSOAPBody().getChildElements(echoResponseName).next();
|
||||
String echoValue = echoResponseElement.getTextContent();
|
||||
System.out.println();
|
||||
System.out.println("Echo Response [" + echoValue + "]");
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String url = "http://localhost:8080/echo/services";
|
||||
String url = "http://localhost:8080/echo-server/services";
|
||||
if (args.length > 0) {
|
||||
url = args[0];
|
||||
}
|
||||
@@ -38,7 +38,9 @@ public class EchoClient extends WebServiceGatewaySupport {
|
||||
Source requestSource = new ResourceSource(request);
|
||||
StringResult result = new StringResult();
|
||||
getWebServiceTemplate().sendSourceAndReceiveToResult(requestSource, result);
|
||||
System.out.println();
|
||||
System.out.println(result);
|
||||
System.out.println();
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws IOException {
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||
|
||||
<bean id="echoClient" class="org.springframework.ws.samples.echo.client.sws.EchoClient">
|
||||
<property name="defaultUri" value="http://localhost:8080/echo/services"/>
|
||||
<property name="defaultUri" value="http://localhost:8080/echo-server/services"/>
|
||||
<property name="request" value="classpath:org/springframework/ws/samples/echo/client/sws/echoRequest.xml"/>
|
||||
</bean>
|
||||
|
||||
Reference in New Issue
Block a user