【问题标题】:parsing wsdl file with wsdl2java result in error message使用 wsdl2java 解析 wsdl 文件会导致错误消息
【发布时间】:2013-11-13 16:35:01
【问题描述】:

我正在尝试从 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 在 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 在 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 在 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 更多

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

【问题讨论】:

标签: java xml wsdl wsdl2java mantis


【解决方案1】:

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

这个article 是关于在 Axis2 中使用 RPC/编码的 WSDL。我希望这会有所帮助。

【讨论】:

    猜你喜欢
    • 2022-08-12
    • 2021-07-13
    • 2018-10-08
    • 1970-01-01
    • 1970-01-01
    • 2021-10-18
    • 1970-01-01
    • 2011-10-30
    • 2014-07-18
    相关资源
    最近更新 更多