Hi Chuck,
Hmm.. Valid scenario and humbly the recursive code that processes the
schema would have failed in this scenario. Your suggesion is right but
I'll have to go through the tests to figure out the consequences.

Ajith

On 3/3/06, Chuck Williams <[EMAIL PROTECTED]> wrote:
> WSDL2Java recurses infinitely in the SchemaCompiler when it encounters
> recursion in the type definitions, e.g. for this single type:
>
>     <xsd:schema targetNamespace="test">
>       <xsd:element name="recursiveElement" type="recursive"/>
>       <xsd:complexType name="recursive">
>         <xsd:sequence>
>           <xsd:element name="sub" type="test:recursive" minOccurs="0"/>
>         </xsd:sequence>
>       </xsd:complexType>
>     </xsd:schema>
>
> This definition validly describes a data strcuture like this one:
>
> <recursive>
>     <sub>
>         <sub/>
>     </sub>
> </recursive>
>
> The attached WSDL file is a simple standalone example that causes the
> infinite recursion.
>
> Is there any way to do this, or is this a bug in axis2, or am I somehow
> confused?  It looks to me like the fix could be as simple as adding the
> name of the complexType being processed to the processedTypemap in
> SchemaCompiler.processNamedComplexSchemaType() before it is processed,
> rather than waiting until after it is processed, but I'm not sure if
> that woudl really work and what other consequences it might have.  There
> seem to be similar issues with other recursion control mechanisms in
> SchemaCompiler, e.g. in processElement().
>
> Thanks for any help,
>
> Chuck
>
>
>
>


--
Ajith Ranabahu

Reply via email to