Olá
Estou com o mesmo problema.
A minha classe EstoqueWS está assim:
@WebService
public class EstoqueWS {
private ItemDao dao = new ItemDao();
@WebMethod(operationName = "todosOsItens")
@WebResult(name = "itens")
public ListaItens getItens(Filtros filtros) {
System.out.println("Chamando metodo todosItens()");
List<Filtro> lista = filtros.getLista();
List<Item> itensResultado = dao.todosItens(lista);
return new ListaItens(itensResultado);
}
}
Filtros:
@XmlRootElement()
@XmlAccessorType(XmlAccessType.FIELD)
public class Filtros {
@XmlElement(name="filtro")
private List<Filtro> filtros;
public Filtros(List<Filtro> filtros) {
this.filtros = filtros;
}
Filtros() {
}
public List<Filtro> getLista() {
return filtros;
}
}
Código que foi gerado pelo SoapUI e utilizado para teste:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://ws.estoque.caelum.com.br/">
<soapenv:Header/>
<soapenv:Body>
<ws:todosOsItens>
<!--Optional:-->
<arg0>
<!--Zero or more repetitions:-->
<filtro>
<!--Optional:-->
<nome>?</nome>
<!--Optional:-->
<tipo>?</tipo>
</filtro>
</arg0>
</ws:todosOsItens>
</soapenv:Body>
</soapenv:Envelope>
E o wsdl
<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://ws.estoque.caelum.com.br/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://ws.estoque.caelum.com.br/" name="EstoqueWSService">
<types>
<xsd:schema>
<xsd:import namespace="http://ws.estoque.caelum.com.br/" schemaLocation="http://localhost:8080/estoquews?xsd=1"/>
</xsd:schema>
</types>
<message name="todosOsItens">
<part name="parameters" element="tns:todosOsItens"/>
</message>
<message name="todosOsItensResponse">
<part name="parameters" element="tns:todosOsItensResponse"/>
</message>
<portType name="EstoqueWS">
<operation name="todosOsItens">
<input wsam:Action="http://ws.estoque.caelum.com.br/EstoqueWS/todosOsItensRequest" message="tns:todosOsItens"/>
<output wsam:Action="http://ws.estoque.caelum.com.br/EstoqueWS/todosOsItensResponse" message="tns:todosOsItensResponse"/>
</operation>
</portType>
<binding name="EstoqueWSPortBinding" type="tns:EstoqueWS">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="todosOsItens">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="EstoqueWSService">
<port name="EstoqueWSPort" binding="tns:EstoqueWSPortBinding">
<soap:address location="http://localhost:8080/estoquews"/>
</port>
</service>
</definitions>