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


  线程“主”中的异常
  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(本机方法)处
          在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个


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

最佳答案

WSDL的编码类型不同,例如RPC /编码,RPC /文字,文档/编码,文档/文字。我认为您的WSDL正在使用RPC /编码。 Axis2不直接支持RPC /编码的编码样式。

article与Axis2一起使用RPC /编码的WSDL。我希望这将有所帮助。

10-07 16:11