diff options
Diffstat (limited to 'sandbox/rfeng/binding-ws-jaxws/src/test/java/weather/WeatherForecastClient.java')
-rw-r--r-- | sandbox/rfeng/binding-ws-jaxws/src/test/java/weather/WeatherForecastClient.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sandbox/rfeng/binding-ws-jaxws/src/test/java/weather/WeatherForecastClient.java b/sandbox/rfeng/binding-ws-jaxws/src/test/java/weather/WeatherForecastClient.java index 38dc930f10..66b9ddce98 100644 --- a/sandbox/rfeng/binding-ws-jaxws/src/test/java/weather/WeatherForecastClient.java +++ b/sandbox/rfeng/binding-ws-jaxws/src/test/java/weather/WeatherForecastClient.java @@ -21,7 +21,9 @@ package weather; import java.io.StringWriter; import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; +import javax.xml.bind.PropertyException; import org.apache.tuscany.sca.node.Contribution; import org.apache.tuscany.sca.node.ContributionLocationHelper; @@ -42,6 +44,12 @@ public class WeatherForecastClient { String location = ContributionLocationHelper.getContributionLocation(WeatherForecastImpl.class); Node node = NodeFactory.newInstance().createNode("WeatherForecast.composite", new Contribution("c1", location)); node.start(); + testJAXWS(node); + + node.stop(); + } + + static void testJAXWS(Node node) throws JAXBException, PropertyException { WeatherForecastSoap weatherService = node.getService(WeatherForecastSoap.class, "WeatherForecastService"); WeatherForecasts result = weatherService.getWeatherByZipCode("94555"); @@ -61,7 +69,5 @@ public class WeatherForecastClient { String xml = writer.toString(); System.out.println(xml); - - node.stop(); } } |