开发者

wsimport problem with Exception in thread "main" java.lang.NullPointerException

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


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?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜