简体   繁体   中英

Unable to Access Amazon Web Service using Axis2 client

I am facing a problem while trying to access Amazon Web Service ( http://soap.amazon.com/schemas2/AmazonWebServices.wsdl ) using Axis2 version 1.6.0

In Eclipse Galileo, I am using Axis2 for generating client stub for Amazon Web service and there I am getting the following error :

Exception occurred during code generation for WSDL  : 
org.apache.axis2.wsdl.codegen.CodeGenerationException: 
java.lang.RuntimeException: 
java.lang.reflect.InvocationTargetException

Prior to this, I have created a Soap Web Service using Axis2 and generated stub for the same. It worked properly.

But when I tried to generate the client stub for a Soap Web Service generated using PHP , I got the same error that I got while accessing Amazon Web Service. Does it create any problem when a PHP Soap Service is accessed from Axis2 client for generating client stub in java?

Thanks in advance.

Above WSDL file contains some SOAP encoding elements as follows.

              <xsd:restriction base="soapenc:Array">
                    <xsd:attribute ref="soapenc:arrayType" wsdl:arrayType="typens:ProductLine[]"/>
                </xsd:restriction>

Axis2 does not support for SOAP encoding that is the reason for above exception.

Am not sure why the error is being caused. If nothing works out, please try changing your eclipse IDE. I had a lot of trouble with 'TargetInvocationException' when I tried generating client stub from the wsdl using WSDL2JAVA Codegen plugin. wsdl2java codegen eclipse plugin- java.lang.reflect.invocationtargetexception

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM