I'm trying to use an existing wsdl published by someone else and am
having compilation issues when using the CXF maven plugin (2.3.3) when
a child element has the same as a parent.

Example scenario:

                           <xs:schema>
                                   <xs:element name="responseClass">
                                       <xs:complexType>
                                            <xs:sequence>
                                                <xs:element
minOccurs="0" name="responseData">
                                                        <xs:complexType>
                                                                <xs:sequence>

 <xs:element maxOccurs="unbounded" name="data">

         <xs:complexType>

                 <xs:sequence>

                         <xs:element name="data">

                                 <xs:complexType>
.....etc


It will generate a java file named: "ResponseClass.java"
The class structure will be:
public class ResponseClass
    |
    --> public static class ResponseData
            |
            --> public static class Data
                     |
                     --> public static class Data

This will fail to compile with the following error:

ResponseClass.java:[652,26]
com.mypackage.ResponseClass.ResponseData.Data is already defined in
com.mypackage.ResponseClass.ResponseData

Renaming the second (child) "data" element to something else fixes the problem.

Any thoughts or work-arounds?

Thanks,
Brian

Reply via email to