addWebMethodAnnotation(method, method.getOperationName());
}
private void addWebMethodAnnotation(JavaMethod method, String operationName) {
JavaAnnotation methodAnnotation = new JavaAnnotation("WebMethod");
methodAnnotation.addArgument("operationName", operationName);
if (!StringUtils.isEmpty(method.getSoapAction())) {
methodAnnotation.addArgument("action", method.getSoapAction());
}
method.addAnnotation("WebMethod", methodAnnotation);
method.getInterface().addImport("javax.jws.WebMethod");