Hei Ajith and Diego,

Thank you for pointing me to the patch. I confirm that it was present in my
build. Still I got problems with recursiv types. I'm using XmlBeans for the
types and I tracked down the issue to:

org.apache.axis2.wsdl.codegen.extension.XMLBeansExtension

The method approx. at line 300:

<snip>
        private void findPlainBase64Types(SchemaType stype, ArrayList
base64Types) {
        
                SchemaProperty[] elementProperties =
stype.getElementProperties();
        
            for (int i = 0; i < elementProperties.length; i++) {
                SchemaType schemaType = elementProperties[i].getType();
                
                if (schemaType.isPrimitiveType()) {
                    SchemaType primitiveType = schemaType.getPrimitiveType();
                
                    if
(Constants.BASE_64_CONTENT_QNAME.equals(primitiveType.getName())) {
                        base64Types.add(elementProperties[i].getName());
                    }
                    
                } else {
-->                    findPlainBase64Types(schemaType, base64Types);
                }  
                }
        }
</snip>

This recursive method will fail when the type described in schema is also
recursive. I've got EquipmentType in EquipmentType in EquipmentType
forever....


Best regards / vennlig hilsen
Tore Larsen
Senior Software Engineer
Comptel Communication AS


-----Original Message-----
From: Ajith Ranabahu [mailto:[EMAIL PROTECTED] 
Sent: 3. april 2006 06:15
To: [email protected]
Subject: Re: FW: [axis2 v0.95] wsdl2java stack overflow

Hi Diego
The patch is already inplace and things should work now (I even added a test
case). Please check with the latest source.

On 4/1/06, Diego <[EMAIL PROTECTED]> wrote:
> Hi Tore,
>
> there is a jira for this issue:
>
> http://issues.apache.org/jira/browse/AXIS2-523
>
> and the thread by Chuck and Ajith:
>
> [Axis2 0.95] Recursive data types and choice particles.
>
> The issue arises because recursive data types definitions in the wsdl 
> are not handled properly.  You can find a patch in the thread and in 
> the jira.
>
> Cheers,
>
> Diego
>
>
> [EMAIL PROTECTED] wrote:
> >  Hi,
> >
> > I can confirm Diego's report on this issue. I have several wsdl's in 
> > my code tree. All of them worked well with axis2 wsdl2java up to a 
> > 0.95-SNAPSHOT build by me march 13th. It worked well using the 
> > 0.95-SNAPSHOT build from march 2nd.
> >
> > The only thing that differs between the wsdl's are the size in terms 
> > of operations and the complexity of the types. I got 
> > StackOverflowError on the biggest one even on a 0.96-SNAPHOT from
yesterday.
> >
> >
> > Best regards
> > Tore Larsen
> > Senior Software Engineer
> > Comptel Communication AS
> >
> > e-mail        :  [EMAIL PROTECTED]
> >
> >
> > -----Original Message-----
> > From: Diego [mailto:[EMAIL PROTECTED]
> > Sent: 26. mars 2006 03:31
> > To: [email protected]
> > Subject: [axis2 v0.95] wsdl2java stack overflow
> >
> > Hi everybody,
> >
> > using axis2 v0.95 wsdl2java I got a stack overflow exception with 
> > the following wsdl file.  The same wsdl file worked fine with all 
> > the previous axis and axis2 versions.
> >
> > Thanks a lot for you help!
> >
> > Diego
> >
> > =================================================================
> >                              ant target 
> > =================================================================
> >
> >   <target name="wsdl2java-astrodas-peer">
> >    <java classname="org.apache.axis2.wsdl.WSDL2Code"
> >       classpathref="axis2.classpath">
> >     <arg value="-uri" />
> >     <arg value="${astrodas-peer.wsdl}" />
> >     <arg value="-o" />
> >     <arg value="${basedir}" />
> >     <arg value="-p" />
> >     <arg value="org.astrodas.ws.peer" />
> >     <arg value="-d"/>
> >     <arg value="xmlbeans" />
> >    </java>
> >   </target>
> >
> > =================================================================
> >                              exception 
> > =================================================================
> >
> > wsdl2java-astrodas-peer:
> >       [java] Retrieving schema at
> > 'http://www.ivoa.net/xml/VOTable/v1.1', relative to 
> > 'file:/Users/diego/Babylon/java/workspace/astrodas-test2/wsdl/'.
> >       [java] java.lang.StackOverflowError
> >       [java]     at
> > org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:180)
> >       [java]     at org.apache.tools.ant.taskdefs.Java.run(Java.java:710)
> >       [java]     at
> > org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:178)
> >       [java]     at
org.apache.tools.ant.taskdefs.Java.execute(Java.java:84)
> >       [java]     at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
> >       [java]     at org.apache.tools.ant.Task.perform(Task.java:364)
> >       [java]     at org.apache.tools.ant.Target.execute(Target.java:341)
> >       [java]     at
> > org.apache.tools.ant.Target.performTasks(Target.java:369)
> >       [java]     at
> > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
> >       [java]     at
> > org.apache.tools.ant.Project.executeTarget(Project.java:1185)
> >       [java]     at
> > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultEx
> > ecutor.ja
> > va:40)
> >       [java]     at
> > org.apache.tools.ant.Project.executeTargets(Project.java:1068)
> >       [java]     at org.apache.tools.ant.Main.runBuild(Main.java:668)
> >       [java]     at org.apache.tools.ant.Main.startAnt(Main.java:187)
> >       [java]     at
> > org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
> >       [java]     at
> > org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
> >       [java] Caused by: java.lang.StackOverflowError
> >       [java] --- Nested Exception ---
> >       [java] java.lang.StackOverflowError
> >
> > =================================================================
> >                             wsdl file 
> > =================================================================
> >
> > <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions 
> > targetNamespace="http://astrodas.org/ws/peer";
> >                          xmlns:tns="http://astrodas.org/ws/peer";
> >                         xmlns:tns1="http://astrodas.org/ws/model";
> >                         xmlns:tns2="http://www.ivoa.net/xml/VOTable/v1.1";
> >                         xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> >
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> >                          
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
> >
> >   <wsdl:types>
> >    <xsd:schema elementFormDefault="qualified"
> > targetNamespace="http://astrodas.org/ws/model";>
> >     <xsd:import namespace="http://www.w3.org/2001/XMLSchema"; />
> >     <xsd:import namespace="http://www.ivoa.net/xml/VOTable/v1.1";
> > schemaLocation="http://www.ivoa.net/xml/VOTable/v1.1"; />
> >     <!--
> >       Standard axis mappings from wsdl to java
> >       ========================================
> >       xsd:base64Binary  byte[]
> >       xsd:boolean       boolean
> >       xsd:byte          byte
> >       xsd:dateTime      java.util.Calendar
> >       xsd:decimal       java.math.BigDecimal
> >       xsd:double        double
> >       xsd:float         float
> >       xsd:hexBinary     byte[]
> >       xsd:int           int
> >       xsd:integer       java.math.BigInteger
> >       xsd:long          long
> >       xsd:QName         javax.xml.namespace.QName
> >       xsd:short         short
> >       xsd:string        java.lang.String
> >     -->
> >     <!-- insertMappingAnnotations -->
> >     <xsd:complexType name="external-object">
> >      <xsd:sequence>
> >       <xsd:element minOccurs="0" maxOccurs="1" name="id"
> > type="xsd:integer" />
> >       <xsd:element minOccurs="1" maxOccurs="1" name="external-id"
> > type="xsd:integer" />
> >       <xsd:element minOccurs="1" maxOccurs="1" name="external-db"
> > type="xsd:string" />
> >       <xsd:element minOccurs="1" maxOccurs="1" name="match"
> > type="xsd:boolean" />
> >      </xsd:sequence>
> >     </xsd:complexType>
> >     <xsd:complexType name="annotation">
> >      <xsd:sequence>
> >       <xsd:element minOccurs="0" maxOccurs="1" name="id"
> > type="xsd:integer" />
> >       <xsd:element minOccurs="0" maxOccurs="1" name="type"
> > type="xsd:string" />
> >       <xsd:element minOccurs="1" maxOccurs="1" name="author"
> > type="xsd:string" />
> >       <xsd:element minOccurs="0" maxOccurs="1" name="timestamp"
> > type="xsd:string" />
> >      </xsd:sequence>
> >     </xsd:complexType>
> >     <xsd:complexType name="mapping-annotation">
> >      <xsd:complexContent mixed="false">
> >       <xsd:extension base="tns1:annotation">
> >        <xsd:sequence>
> >         <xsd:element minOccurs="1" maxOccurs="unbounded"
> > name="external-object" type="tns1:external-object" />
> >         <xsd:element minOccurs="0" maxOccurs="1"         name="text"
> >          type="xsd:string" />
> >         <xsd:element minOccurs="0" maxOccurs="1"
> > name="reliability"     type="xsd:float" />
> >         <xsd:element minOccurs="0" maxOccurs="1"         name="ra-mean"
> >          type="xsd:double" />
> >         <xsd:element minOccurs="0" maxOccurs="1"         name="dec-mean"
> >         type="xsd:double" />
> >        </xsd:sequence>
> >       </xsd:extension>
> >      </xsd:complexContent>
> >     </xsd:complexType>
> >     <xsd:element name="insertMappingAnnotations">
> >      <xsd:complexType>
> >       <xsd:sequence>
> >        <xsd:element minOccurs="1" maxOccurs="unbounded"
> > name="mapping-annotation" type="tns1:mapping-annotation" />
> >       </xsd:sequence>
> >      </xsd:complexType>
> >     </xsd:element>
> >     <xsd:element name="insertMappingAnnotationsResponse">
> >      <xsd:complexType>
> >       <xsd:sequence>
> >        <xsd:element minOccurs="1" maxOccurs="1" name="result"
> > type="xsd:int" />
> >       </xsd:sequence>
> >      </xsd:complexType>
> >     </xsd:element>
> >     <!-- executeGlobalMappingTableQuery -->
> >     <xsd:element name="executeGlobalMappingTableQuery">
> >      <xsd:complexType>
> >       <xsd:sequence>
> >        <xsd:element minOccurs="1" maxOccurs="1" name="query"
> > type="xsd:string" />
> >       </xsd:sequence>
> >      </xsd:complexType>
> >     </xsd:element>
> >     <xsd:element name="executeGlobalMappingTableQueryResponse">
> >      <xsd:complexType>
> >       <xsd:sequence>
> >        <xsd:element minOccurs="1" maxOccurs="1" ref="tns2:VOTABLE" />
> >       </xsd:sequence>
> >      </xsd:complexType>
> >     </xsd:element>
> >    </xsd:schema>
> >   </wsdl:types>
> >
> >   <!-- insertMappingAnnotations -->
> >   <wsdl:message name="insertMappingAnnotationsMessage">
> >    <wsdl:part name="body" element="tns1:insertMappingAnnotations" />
> >   </wsdl:message>
> >   <wsdl:message name="insertMappingAnnotationsResponseMessage">
> >    <wsdl:part name="body" element="tns1:insertMappingAnnotationsResponse"
/>
> >   </wsdl:message>
> >   <!-- executeGlobalMappingTableQuery -->
> >   <wsdl:message name="executeGlobalMappingTableQueryMessage">
> >    <wsdl:part name="body" element="tns1:executeGlobalMappingTableQuery"
/>
> >   </wsdl:message>
> >   <wsdl:message name="executeGlobalMappingTableQueryResponseMessage">
> >    <wsdl:part name="body"
> > element="tns1:executeGlobalMappingTableQueryResponse" />
> >   </wsdl:message>
> >
> >   <wsdl:portType name="AstrodasPeer">
> >    <wsdl:operation name="insertMappingAnnotations">
> >     <wsdl:documentation>Stores an array of annotations in the 
> > annotation backend database</wsdl:documentation>
> >     <wsdl:input message="tns:insertMappingAnnotationsMessage" />
> >     <wsdl:output message="tns:insertMappingAnnotationsResponseMessage" />
> >    </wsdl:operation>
> >    <wsdl:operation name="executeGlobalMappingTableQuery">
> >     <wsdl:documentation>Executes a query on the global mapping table 
> > of the p2p network of annotation</wsdl:documentation>
> >     <wsdl:input message="tns:executeGlobalMappingTableQueryMessage" />
> >     <wsdl:output
> > message="tns:executeGlobalMappingTableQueryResponseMessage" />
> >    </wsdl:operation>
> >   </wsdl:portType>
> >
> >   <wsdl:binding name="AstrodasPeerBinding" type="tns:AstrodasPeer">
> >    <soap:binding transport="http://schemas.xmlsoap.org/soap/http";
> > style="document" />
> >    <wsdl:operation name="insertMappingAnnotations">
> >     <soap:operation soapAction="insertMappingAnnotations" />
> >     <wsdl:input>
> >      <soap:body use="literal" />
> >     </wsdl:input>
> >     <wsdl:output>
> >      <soap:body use="literal" />
> >     </wsdl:output>
> >    </wsdl:operation>
> >    <wsdl:operation name="executeGlobalMappingTableQuery">
> >     <soap:operation soapAction="executeGlobalMappingTableQuery" />
> >     <wsdl:input>
> >      <soap:body use="literal" />
> >     </wsdl:input>
> >     <wsdl:output>
> >      <soap:body use="literal" />
> >     </wsdl:output>
> >    </wsdl:operation>
> >   </wsdl:binding>
> >
> >   <wsdl:service name="astrodas-peer">
> >    <wsdl:port name="astrodas-peer" binding="tns:AstrodasPeerBinding">
> >     <soap:address
> > location="http://localhost:8080/axis2/services/astrodas-peer"; />
> >    </wsdl:port>
> >   </wsdl:service>
> >
> > </wsdl:definitions>
> >
>


--
Ajith Ranabahu

Reply via email to