ADB still not clever enough wrt Elements and ComplexTypes with the same name.
-----------------------------------------------------------------------------

                 Key: AXIS2-2914
                 URL: https://issues.apache.org/jira/browse/AXIS2-2914
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: databinding
    Affects Versions: 1.2
            Reporter: Paul Fremantle
            Assignee: Amila Chinthaka Suriarachchi
             Fix For: 1.3


Suppose I have this schema:

<s:element name="Paul" type="tns:Paul"/>
<s:complexType name="Paul">...</s:complexType>

At the moment, ADB generates:

Paul->Paul53->children

In other words it generates a random number to separate the Element from the 
ComplexType.

Unfortunately, if you have two WSDLs that share the same schema, you can end up 
with different random numbers in each case, meaning that you can't actually 
share the objects.

Also, in 99% of cases, this will be the only use of a ComplexType - in fact the 
naming (Element name == complexType name) sort of implies that. 
I recommend users edit the Schema to inline the complextype. So rewrite the 
schema like this:
<s:element name="Paul">
     <s:complexType>...</s:complexType>
</s:element>

But of course usually this Schema is generated by .NET so we don't want to edit 
it. 

Here is my suggestions:
1) add a switch to automatically hide complextypes that have the same name as 
elements. (i.e. generate code the same as if the complextype was anonymous and 
inline)
2) If the user hasn't specified the switch: when you come across a complexType 
name that is the same as an element name, name the java object PaulT. I don't 
see how the same name could appear a third time since that would be an error in 
the schema.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to