cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <>
Subject [jira] [Resolved] (CXF-5238) WSDL2Java generates naming conflicts on a valid schema
Date Thu, 29 Aug 2013 14:50:52 GMT


Daniel Kulp resolved CXF-5238.

       Resolution: Not A Problem
    Fix Version/s: Invalid
         Assignee: Daniel Kulp

This is not a problem in CXF.  This is a JAXB "issue/limitation".  If something results in
a conflict, JAXB spits out an error and then requires the user to configure a binding file
to get around it.   In this particular case, a binding file of:

<jaxb:bindings xmlns:jaxb=""
    <jaxb:bindings schemaLocation="foo.wsdl#types1">
        <jaxb:bindings node="//xs:element[@name='IsCardPersonalizedRequest']">
            <jaxb:factoryMethod name="IsCardPersonalizedRequestElement"/>
        <jaxb:bindings node="//xs:element[@name='GetCardholderProfileRequest']">
            <jaxb:factoryMethod name="GetCardholderProfileRequestElement"/>
        <jaxb:bindings node="//xs:element[@name='ReverseTransactionRequest']">
            <jaxb:factoryMethod name="ReverseTransactionRequestElement"/>
        <jaxb:bindings node="//xs:element[@name='EnrollNewMemberInstantIssueRequest']">
            <jaxb:factoryMethod name="EnrollNewMemberInstantIssueRequestElement"/>
        <jaxb:bindings node="//xs:element[@name='EnrollNewMemberRequest']">
            <jaxb:factoryMethod name="EnrollNewMemberRequestElement"/>

would fix it by renaming a few of the generated methods to not end up with a conflict.   Again,
this is a JAXB thing.

> WSDL2Java generates naming conflicts on a valid schema
> ------------------------------------------------------
>                 Key: CXF-5238
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: Tooling
>    Affects Versions: 2.7.5
>         Environment: Windows 7, Apache ant
>            Reporter: David Roytenberg
>            Assignee: Daniel Kulp
>              Labels: newbie
>             Fix For: Invalid
> When running wsdl2java on a valid WSDL, the tool reports naming conflicts under the following
> There is an element of this form
> <xs:element name="FooTransaction">
>   <xs:complexType>
>     <xs:sequence>
> 	<xs:element minOccurs="0"     name="request" nillable="true"							type="tns:FooTransactionRequest"
>     </xs:sequence>
>   </xs:complexType>
> </xs:element>
> and later another of the form 
> <xs:element name="FooTransactionRequest" nillable="true"
> 				type="tns:FooTransactionRequest" />
> Wsdl2Java reports a naming conflict 
> referencing the line numbers of the xs:element name="request and of the xs:element name="FooTransactionRequest"
> The validator in Eclipse says this is a valid WSDL.
> The service provider that owns the WSDL changed the inner element names inside the complex
types which created this problem.  The inner name used to be of the form "fooTransactionRequest"
which does not cause a problem.  In fact changing the name request to some other string also
fixes the name conflict.
> It looks like the inner element of the inner element is being appended to the name of
the outer element in the first block above, which generates a name identical to the element

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message