diff options
Diffstat (limited to 'sca-java-2.x/trunk/itest/ws-jaxws/external-service')
2 files changed, 21 insertions, 6 deletions
diff --git a/sca-java-2.x/trunk/itest/ws-jaxws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldService.java b/sca-java-2.x/trunk/itest/ws-jaxws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldService.java index 3dd039ff3c..796ef82792 100644 --- a/sca-java-2.x/trunk/itest/ws-jaxws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldService.java +++ b/sca-java-2.x/trunk/itest/ws-jaxws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldService.java @@ -35,9 +35,9 @@ public class HelloWorldService { @ResponseWrapper(localName = "getGreetingsResponse", targetNamespace = "http://helloworld/external", className = "org.apache.tuscany.sca.binding.ws.jaxws.external.service.GetGreetingsResponse") public String getGreetings( @WebParam(name = "name", targetNamespace = "http://helloworld/external") String name) { - System.out.println("Entering External HelloWorld.getGreetings: " + name); + System.out.println("Entering External Service HelloWorld.getGreetings: " + name); String response = "Hello " + name; - System.out.println("Leaving External HelloWorld.getGreetings: " + response); + System.out.println("Leaving External Service HelloWorld.getGreetings: " + response); return response; } diff --git a/sca-java-2.x/trunk/itest/ws-jaxws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldServiceLauncher.java b/sca-java-2.x/trunk/itest/ws-jaxws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldServiceLauncher.java index fc5fd6d701..ba7e033f63 100644 --- a/sca-java-2.x/trunk/itest/ws-jaxws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldServiceLauncher.java +++ b/sca-java-2.x/trunk/itest/ws-jaxws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldServiceLauncher.java @@ -23,12 +23,27 @@ import javax.xml.ws.Endpoint; public class HelloWorldServiceLauncher { - public static void main(String[] args) throws Exception { + public Endpoint endpoint; + + public HelloWorldServiceLauncher(){ + + } + + public void createService(){ System.out.println(">>> Starting external JAXWS service at http://localhost:8086/External/HelloWorld"); // default JVM JAXWS support. - Endpoint.publish("http://localhost:8086/External/HelloWorld", - new HelloWorldService()); - + endpoint= Endpoint.publish("http://localhost:8086/External/HelloWorld", + new HelloWorldService()); + } + + public void destoryService(){ + System.out.println(">>> Stopping external JAXWS service at http://localhost:8086/External/HelloWorld"); + endpoint.stop(); } + + public static void main(String[] args) throws Exception { + HelloWorldServiceLauncher launcher = new HelloWorldServiceLauncher(); + launcher.createService(); + } } |