Java JAX-WS位置参数

Java JAX-WS位置参数,java,web-services,jax-ws,Java,Web Services,Jax Ws,我有这样一个web服务: @WebMethod public User getUser(String userid, String surname) 发送此请求: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchem

我有这样一个web服务:

@WebMethod
public User getUser(String userid, String surname) 
发送此请求:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
      <login>
         <in0>j.brown</in0>
         <in1>brown</in1>
      </login>
   </soapenv:Body>
</soapenv:Envelope>

j、 棕色的
棕色的
所有参数在jax-ws解析后都为null。如果我使用userid和姓氏,而不是xml节点中的in0和in1,那么所有参数的值都是正确的


有没有办法将jax ws配置为使用参数位置而不是名称来解析请求?

将Java对象编组为XML时,它对应于该Java类字段/属性。要获取in0和in1,需要将其定义为Java类字段中的字段。希望有帮助。换句话说,JAX-WS不能配置为使用位置参数吗?