Axis2's wsdl2java fails on RPC/Encoded style web services

前端 未结 8 1411
离开以前
离开以前 2021-02-05 18:24

Is there any alternative to Axis2? Or the way to make it work (different data binding, for example)?

Retrieving document at \'...\'.
Exception in thread \"main\"         


        
8条回答
  •  闹比i
    闹比i (楼主)
    2021-02-05 18:41

    The answer post on soapenc.xsd found here Clickatell SOAP wsdl to JAXB java classes helped me .

    I was using wsdl2java utility of axis1.5, we got the similar error on array.

    Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
                at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
                at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
                at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
        Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
                at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:53)
                at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
                ... 2 more
        Caused by: java.lang.reflect.InvocationTargetException
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                at java.lang.reflect.Method.invoke(Method.java:597)
                at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50)
                ... 3 more
        Caused by: org.apache.axis2.schema.SchemaCompilationException: can not find type {http://schemas.xmlsoap.org/soap/encoding/}Array from the parent schema ....
                at org.apache.axis2.schema.SchemaCompiler.copyMetaInfoHierarchy(SchemaCompiler.java:1296)
                at org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCompiler.java:1258)
                at org.apache.axis2.schema.SchemaCompiler.processContentModel(SchemaCompiler.java:1153)
                at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:1097)
                at org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:1017)
    

    I tried updating my wsdl file by creating the soapenc.xsd with the contents from website 'http://schemas.xmlsoap.org/soap/encoding/'. As shown below, this worked really for me.

    
    
        
    
    
    
        
    
    
        
    
     .. 
    
                  ..          
        
    
    
                       
    
    

提交回复
热议问题