-
1. Re: Example needed of servlet connecting to web service
paoletto Feb 7, 2007 5:51 AM (in response to paoletto)Here's my code:
URL wsdl = new URL("http://localhost:8080/ServizioEJB/Hello?wsdl");
QName qname = new QName("http://servizioDipartimentale.org/","Hello");
try {
ServiceFactory factory = ServiceFactory.newInstance();
Service service = factory.createService(wsdl, qname);
Hello hello = (Hello) service.getPort(Hello.class);
output= hello.sayHello();
} catch (Exception e) {
e.printStackTrace();
out.println("error");
}
and i get "error".. Probably some mistake somewhere, but no clue if for example i'm setting qname in a wrong way.. -
2. Re: Example needed of servlet connecting to web service
paoletto Feb 7, 2007 6:52 AM (in response to paoletto)well, im checking and it seems the problem is in
service.getPort who give this error:
java.lang.UnsupportedOperationException: setProperty must be overridden by all subclasses of SOAPMessage
any clue? -
3. Re: Example needed of servlet connecting to web service
dwin Feb 7, 2007 8:13 AM (in response to paoletto)ensure that your JDK is 1.5 and not 1..6
-
4. Re: Example needed of servlet connecting to web service
paoletto Feb 7, 2007 9:50 AM (in response to paoletto)"dwin" wrote:
ensure that your JDK is 1.5 and not 1..6
eerm... right! my jdk is 1.6... didnt imagine that -_-
With 1.5.0 it works perfectly! well.. many thanks :)