I'm trying to call the web service here: http://publicbetawebservices.hotel.de/V2_8/FreeHotelSearchWebService.svc?WSDL
I've generated proxy classes using wsimport with JDK1.6.0_29. My wsimport command line is:
wsimport.exe" -keep -B-XautoNameResolution -d E:\mapov\mapov-dev\shared\hotel_info\ http://publicbetawebservices.hotel.de/V2_8/FreeHotelSearchWebService.svc?WSDL
I'm using the following code to attempt to call the service:
QName qName = new QName("http://webservices.hotel.de/V2_8", "FreeHotelSearchWebService");
FreeHotelSearchWebService service = new FreeHotelSearchWebService(new URL("http://publicbetawebservices.hotel.de/V2_8/FreeHotelSearchWebService.svc"), qName);
IFreeHotelSearchWebService sws = service.getBasicHttpBindingIFreeHotelSearchWebService();
String version = sws.getWebservicesVersion();
System.out.println("Hotel.info web service version: " + version);
However I get the following exception:
Exception in thread "main" javax.xml.ws.WebServiceException: Unsupported endpoint address: at com.sun.xml.ws.api.pipe.TransportTubeFactory.create(TransportTubeFactory.java:148) at com.sun.xml.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:134) at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:641) at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600) at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585) at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482) at com.sun.xml.ws.client.Stub.process(Stub.java:323) at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:161) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:113) at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:93) at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:144) at $Proxy42.getWebservicesVersion(Unknown Source)
In most examples I've seen the generated code includes a getPort() method but that hasn't been generated for this class. Is my code wrong or do I need to run wsimport differently? I've also tried calling the FreeHotelWebService constructor without the parameters which yields the same exception.