0
votes

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.

2

2 Answers

0
votes

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.

0
votes

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