-2

我正在使用 wsimport 生成一个 Web 服务客户端,但出现这样的错误

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)

任何线索或任何想法?

埃德温·贾斯 TIA

4

2 回答 2

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?

于 2011-09-01T22:10:43.407 回答
0

我也遇到了同样的情况,然后我意识到我的 URL 格式不正确。请检查一下。

于 2014-02-18T08:45:01.167 回答