我正在尝试从wsdl文件生成java客户端存根,但这会导致一个麻烦的错误消息:
线程“main”中的异常 org.apache.axis2.wsdl.codegen.CodeGenerationException: 了java.lang.RuntimeException: java.lang.reflect.InvocationTargetException 在org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener) ationEngine.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 在org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(Simp) leDBExtension.java:53) 在org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:246) ... 2更多引起:java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) 在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:找不到类型 来自父级的{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.processAnonymousComplexSchemaType(SchemaCompiler.java:1055) 在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) 在org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:102) ......还有8个
有谁能告诉我这里可能出现什么问题?
答案 0 :(得分:2)
WSDL有不同的编码类型,如RPC / encoded,RPC / literal,Document / encoded,Document / literal。我认为您的WSDL使用RPC / encoded。 Axis2不直接支持RPC /编码编码样式。
这个article是关于在Axis2中使用RPC /编码的WSDL。我希望这会有所帮助。