diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-03-09 01:25:10 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-03-09 01:25:10 +0000 |
commit | 1d3030d1a5539fa19e3e93e8caf4e17745f2debe (patch) | |
tree | f2c4da4e20a321291a3ca28c675721d4a6777750 /sandbox/rfeng/binding-ws-jaxws/src/test/java/weather/WeatherForecastClient.java | |
parent | 6fbd3d0eb960831201651bbfd77b93a99ab9a05b (diff) |
Start with a known WSDL
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@920606 13f79535-47bb-0310-9956-ffa450edef68
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(); } } |