2

我正在尝试从 wsdl 文件生成 java 客户端存根,但这会导致繁琐的错误消息:

线程“主”org.apache.axis2.wsdl.codegen.CodeGenerationException 中的异常:java.lang.RuntimeException:org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate 处的 java.lang.reflect.InvocationTargetException(CodeGenerationEngine.java :293) 在 org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) 在 org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) 引起:java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(Simp leDBExtension.java:53) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java: 246) ... 2 更多原因:sun.reflect.NativeMethodAccessorImpl 处的 java.lang.reflect.InvocationTargetException。invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java :601) 在 org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50) ... 3 更多原因:org.apache.axis2.schema.SchemaCompilationException: 找不到类型 {.. 3更多原因:org.apache.axis2.schema.SchemaCompilationException:找不到类型{.. 3更多原因:org.apache.axis2.schema.SchemaCompilationException:找不到类型{http://schemas.xmlsoap.org/soap/encoding/ }来自父模式的数组http://futureware.biz/mantisconnect 在 org.apache.axis2.schema.SchemaCompiler.copyMetaInfoHierarchy(SchemaCompiler.java:1371) 在 org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCompiler.java:1333) 在 org.apache.axis2.schema.SchemaCompiler.processContentModel (SchemaCompiler.java:1228) 在 org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1172) 在 org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:1092) 在 org.apache。 axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:1006) 在 org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:645) 在 org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java: 604)在org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:2069) 在 org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1958) 在 org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1156) 在 org.apache.axis2.schema.SchemaCompiler .processNamedComplexSchemaType(SchemaCompiler.java:1092) 在 org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:1006) 在 org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:645) 在 org. apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:604) 在 org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:2069) 在 org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler. java:1952) 在 org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1156) 在 org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:1009) 在 org.apache.axis2.schema.SchemaCompiler .processElement(SchemaCompiler.java:645) 在 org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:615) 在 org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:423) 在 org. apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:292) at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:102) ... 还有 8 个processSchema(SchemaCompiler.java:1009) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:645) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:615) at org.apache .axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:423) at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:292) at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java :102) ... 还有 8 个processSchema(SchemaCompiler.java:1009) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:645) at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:615) at org.apache .axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:423) at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:292) at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java :102) ... 还有 8 个java:292) 在 org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:102) ... 还有 8 个java:292) 在 org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:102) ... 还有 8 个

谁能告诉我这里可能是什么问题?

4

1 回答 1

2

WSDL 有不同的编码类型,例如 RPC/encoded、RPC/literal、Document/encoded、Document/literal。我认为您的 WSDL 正在使用 RPC/编码。Axis2 不直接支持 RPC/encoded 编码样式。

本文是关于在 Axis2使用 RPC/编码的 WSDL。我希望这将有所帮助。

于 2013-11-02T17:41:46.763 回答