-2

I am generating a web service client using wsimport but I get an error like this

Exception in thread "main" java.lang.NullPointerException at sun.net.www.ParseUtil.toURI(ParseUtil.java:261) at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:905) at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1172) at com.sun.tools.internal.ws.wsdl.parser.DOMForest.parse(DOMForest.java:222) at com.sun.tools.internal.ws.wsdl.parser.DOMForest.parse(DOMForest.java:139) at com.sun.tools.internal.ws.wsdl.parser.MetadataFinder.parseWSDL(MetadataFinder.java:91) at com.sun.tools.internal.ws.wsdl.parser.WSDLParser.parse(WSDLParser.java:130) at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:115) at com.sun.tools.internal.ws.wscompile.WsimportTool.run(WsimportTool.java:172) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:105) at com.sun.tools.internal.ws.WsImport.main(WsImport.java:41)

Any cluees or any idea ?

Edwin jaws TIA

Edwin Jaws
  • 209
  • 1
  • 2
  • 5

2 Answers2

0

The same happened to me, then I realised that I had a malformed URL. Please check it.

Jupiter Jones
  • 863
  • 1
  • 7
  • 12
0

It looks like there's something wrong with the URL for the WSDL; a NullPointerException sounds like it's completely missing. Perhaps your command line is not being parsed the way you think it is.

How do you call wsimport? Using what parameters? Via Windows command line, Ant script or Linux shell?

Michael Borgwardt
  • 342,105
  • 78
  • 482
  • 720