Mudanças entre as edições de "Criando aplicação JAX WS com geração automática de WSDL"
De Basef
Linha 1: | Linha 1: | ||
Segue abaixo exemplo de endpoint SOAP, cuja geração do WSDL é automática: | Segue abaixo exemplo de endpoint SOAP, cuja geração do WSDL é automática: | ||
+ | |||
+ | <source lang="java"> | ||
import javax.xml.ws.Endpoint; | import javax.xml.ws.Endpoint; | ||
Linha 23: | Linha 25: | ||
} | } | ||
} | } | ||
+ | |||
+ | </source> | ||
[[Category:Java]] | [[Category:Java]] |
Edição das 10h22min de 26 de junho de 2017
Segue abaixo exemplo de endpoint SOAP, cuja geração do WSDL é automática:
import javax.xml.ws.Endpoint; import javax.jws.WebService; public class App { public static void main(String[] args) { InvestimentoService service = new InvestimentoService(); String url = "http://localhost:8080/investimentows"; System.out.println("Serviço rodando " + url); Endpoint.publish(url, service); } } @WebService public class InvestimentoService { public String helloWorld() { return "Teste"; } }