我在下面的webservice代码中将输入参数作为数组数据类型。我想知道要给userRoles
的JAXB绑定,以便它将在wsdl中创建ArrayOfEmpRole
。现在,由于EmpRoleArray
,正在创建parameterStyle = BARE
。
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.BARE)
@WebService(serviceName = "EmployeeService", name="EmployeeService")
public class EmployeeService {
@WebMethod()
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.BARE)
public String addEmployeeRoles(@WebParam(name="empRoles")final EmpRole[] userRoles){
return "SUCCESS";
}
}