Estou alterando o nome do metodo de getItens para todosOsItens porem eu altero no Java,mas nem no Wsld e nem no sopa UI essa alteração e implementada.
Segue abaixo o codigo Java:
package br.com.caelum.estoque.ws;
import java.util.List;
import javax.jws.WebMethod;
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")
public List<Item>getItens(){
System.out.println("Chamando o getItens()");
List<Item> lista = dao.todosItens();
return lista;
}
}
Metodo main
package br.com.caelum.estoque.ws;
import javax.xml.ws.Endpoint;
public class PublicaWebService {
public static void main(String[] args) {
EstoqueWs service = new EstoqueWs();
String url = "http://localhost:8080/estoquews";
Endpoint.publish(url,service);
}
}
wsdl
<!--
Published by JAX-WS RI (http://jax-ws.java.net). RI's version is JAX-WS RI 2.2.9-b130926.1035 svn-revision#5f6196f2b90e9460065a4c2f4e30e065b245e51e.
-->
<!--
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>
mesmo eu rodando de novo e atualizando o soap ui nao faz a alteração.