您需要使用@WebMehtod注释您的方法.
例
@WebService(name = "dataService", targetNamespace = "http://example.com/vap/webservice/dataservice/definition")
@SOAPBinding(style = Style.DOCUMENT, use = Use.LITERAL, parameterStyle = ParameterStyle.WRAPPED)
public interface DataSEI {
@WebMethod(action = "createAction", operationName = "create")
DataTransferObjectStatusContainer create(
@WebParam(name = "objects", targetNamespace = "http://example.com/vap/webservice/dataservice/definition")
DataTranferObjectContainer pObjectsContainer,
@WebParam(name = "atomic", targetNamespace = "http://example.com/vap/webservice/dataservice/definition")
boolean pAsAtomicOperation) throws Fault;
}
注意:示例中的许多注释都不是必需的,但我把它放在那里向您展示使用JAX-WS可以做的所有事情