Following JAVA annotation can be used to avoid <return> tag from SOAP web service response.
@WebService(serviceName = "Operations")
public class Service {
@WebMethod(operationName = "processUser")
@SOAPBinding(parameterStyle=ParameterStyle.BARE)
public Result processUser(@WebParam(name = "userName")String userName) {
Result result = new Result();
result.setResultCode("1");
result.setResultDesc("success");
return result;
}
}
ParameterStyle.BARE will return SOAP response with your defined object attributes.
No comments:
Post a Comment