Solucionado (ver solução)
Solucionado
(ver solução)
1
resposta

Eu altero o getItem para TodosOsItens e quando rodo o wsdl continua como get item,segue abaixo o xml e minha classe

XML-----


This XML file does not appear to have any style information associated with it. The document tree is shown below.
<!--...-->
<!--
 Generated by JAX-WS RI (http://jax-ws.java.net). RI's version is JAX-WS RI 2.2.9-b130926.1035 svn-revision#5f6196f2b90e9460065a4c2f4e30e065b245e51e. 
-->
<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="getItens">
<part name="parameters" element="tns:getItens"/>
</message>
<message name="getItensResponse">
<part name="parameters" element="tns:getItensResponse"/>
</message>
<portType name="EstoqueWs">
<operation name="getItens">
<input wsam:Action="http://ws.estoque.caelum.com.br/EstoqueWs/getItensRequest" message="tns:getItens"/>
<output wsam:Action="http://ws.estoque.caelum.com.br/EstoqueWs/getItensResponse" message="tns:getItensResponse"/>
</operation>
</portType>
<binding name="EstoqueWsPortBinding" type="tns:EstoqueWs">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="getItens">
<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>

CLASSE JAVA

package br.com.caelum.estoque.ws;

import java.util.List;

import javax.jws.WebMethod;
import javax.jws.WebResult;
import javax.jws.WebService;

import br.com.caelum.estoque.modelo.item.Item;
import br.com.caelum.estoque.modelo.item.ItemDao;


@WebService
public class EstoqueWs {

    private ItemDao dao = new ItemDao();

    @WebMethod(operationName="todosOsItens")
    @WebResult(name="Itens")
    public List <Item> getItens(){

        System.out.println("Chamando getItens");

        List<Item> lista =dao.todosItens();

        return lista;

    }

}
1 resposta

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software