Last active
March 12, 2019 22:53
-
-
Save gliviu/0c23361a3681bc93659d to your computer and use it in GitHub Desktop.
Java standalone soap service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.jws.WebService; | |
import javax.xml.ws.Endpoint; | |
// http://localhost:8080/helloService?wsdl | |
// Credits: http://hofmanndavid.blogspot.ro/2008/11/easiest-way-to-publish-java-web.html | |
@WebService(targetNamespace="namespace") | |
public class StandaloneHelloSoapService { | |
public String hello(String name) { | |
return "Hello " + name + " !"; | |
} | |
public static void main(String ...args) { | |
Endpoint.publish("http://localhost:8080/helloService", new StandaloneHelloSoapService()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment