线程“main”中的异常org.apache.axis2.wsdl.codegen.CodeGenerationException:无效的WSDL?

时间:2012-03-16 18:33:47

标签: java web-services apache tomcat

尝试生成Web服务客户端存根时出现以下错误...

当我登录Apache Admin页面时,我可以看到'http:// localhost:8080 / axis2 / services / HelloWorldService?wsdl'的Web服务和服务端点 - 为什么WSDL2Java.bat无法找到wsdl文件..?

C:\AAA\HelloWorld\client\client>WSDL2Java.bat -uri http://localhost:8080/axis2/services/HelloWorldService?wsdl -o client

Using AXIS2_HOME:   C:\Axis2\axis2-1.5.6
Using JAVA_HOME:    C:\Program Files (x86)\Java\jdk1.6.0_23
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Invalid WSDL Location
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:58)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:28)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:22)
Caused by: java.io.FileNotFoundException: http:\localhost:8080\axis2\services\HelloWorldService?wsdl (The filename, directory name, or volume label syntax is incorrect)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.getWOM(CodeGenerationEngine.java:110)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:52)
        ... 2 more
C:\AAA\HelloWorld\client\client>

1 个答案:

答案 0 :(得分:0)

显然异常说,它找不到文件

http:\localhost:8080\axis2\services\HelloWorldService?wsdl.

请检查是否有文件并运行。