import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebParam.Mode;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.ws.BindingType;
import javax.xml.ws.Endpoint;
import javax.xml.ws.soap.SOAPBinding;
@WebService(targetNamespace = "http://ws.demo.com", serviceName = "TestWsService")
@BindingType(value=SOAPBinding.SOAP12HTTP_BINDING)
public class WsDemo {
public static void main(String[] args) {
WsDemo hello = new WsDemo();
Endpoint.publish("http://localhost:8091/testWs/services/TestWs", hello);
System.out.println("webservice Public Success");
}
@WebMethod(action = "access")
@WebResult(name = "accessReturn")
public String access(@WebParam(name = "xmldata", mode = Mode.IN) String xmldata) {
return "invoke success" + xmldata;
}
}