Mudanças entre as edições de "Criando aplicação JAX WS com geração automática de WSDL"
De Basef
(Criou página com '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 stati...') |
|||
Linha 24: | Linha 24: | ||
} | } | ||
− | [Category:Java] | + | [[Category:Java]] |
Edição das 10h21min 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"; }
}