Skip to content

Instantly share code, notes, and snippets.

@tassioauad

tassioauad/HelloPort.java Secret

Last active Jan 3, 2018
Embed
What would you like to do?
Spring Boot + Apache CXF (JAX-WS)
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.ws.RequestWrapper;
import javax.xml.ws.ResponseWrapper;
import java.util.logging.Logger;
@WebService(serviceName = "HelloService", portName = "HelloPort", targetNamespace = "http://tassioauad.com/")
public class HelloPort {
private static final Logger LOG = Logger.getLogger(HelloPort.class.getName());
@WebResult(name = "return", targetNamespace = "")
@RequestWrapper(localName = "sayHello", targetNamespace = "http://tassioauad.com/", className = "tassioauad.com.SayHello")
@WebMethod(action = "urn:SayHello")
@ResponseWrapper(localName = "sayHelloResponse", targetNamespace = "http://tassioauad.com/", className = "tassioauad.com.SayHelloResponse")
public java.lang.String sayHello(@WebParam(name = "myname", targetNamespace = "") String myname) {
try {
return "Hello, " + myname + "!";
} catch (java.lang.Exception ex) {
ex.printStackTrace();
throw new RuntimeException(ex);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.