EDIT ---------------------------
Tentei Fazer o seguinte no meu client:
importjava.net.MalformedURLException;importjava.net.URL;importjavax.xml.namespace.QName;importjavax.xml.ws.Service;importcom.test.dhanago.TestWs;publicclassIndex{publicstaticvoidmain(String[]args){Stringlocal="http://127.0.0.1:8080/TutWS/TestWs?wsdl";URLurl=null;try{url=newURL(local);}catch(MalformedURLExceptione){// TODO Auto-generated catch blocke.printStackTrace();}//Nome qualifcado do serviço//Primeiro argumento é o URI do serviço//Segundo é o nome do serviço publicado no WSDLQNameqname=newQName("http://dhanago.test.com/","TestWsService");//Cria, de fato, uma fábrica para o serviçoServiceservice=Service.create(url,qname);//Extrai a interface endpoint, o serviço ?port?.TestWsws=service.getPort(TestWs.class);System.out.println(ws.greet("Gabriel"));}}
Referênciando o Projeto Web.
Mais não funcionou,
Abaixo o que foi gerado:
Exception in thread "main" com.sun.xml.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class com.test.dhanago.jaxws.Greet is not found. Have you run APT to generate them? at com.sun.xml.ws.model.RuntimeModeler.getClass(RuntimeModeler.java:287) at com.sun.xml.ws.model.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:596) at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:543) at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:371) at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:258) at com.sun.xml.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:633) at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:328) at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:311) at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:339) at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:343) at javax.xml.ws.Service.getPort(Unknown Source) at Index.main(Index.java:30)
D
deadvicious
Gabriel,
O jeito que eu sempre testo meus Web Services é usando o SoapUI, você só passa a url do wsdl que ele gera um cliente, tudo automático.
tb estou com o mesmo problema acima. Daqui do serviço a url do aplicativo (http://www.soapui.org/) é bloqueada, alguem tem alguma observação a mais sobre o assunto?