Skip to content

Instantly share code, notes, and snippets.

@tassioauad
Last active January 3, 2018 20:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tassioauad/1e7c8243911d6a50a1faa48dbc1b4230 to your computer and use it in GitHub Desktop.
Save tassioauad/1e7c8243911d6a50a1faa48dbc1b4230 to your computer and use it in GitHub Desktop.
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