This JIRA issue follows my post in user mailing list (as asked by Dan Kulp).
The behavior of Aegis databinding between CXF 2.3.9 and 2.7.5 has somewhat changed regarding inheritance.
- two classes, BaseType and ExtendedType (that extends BaseType), both declaring XML elements and attributes, both having a distinct namespace (base-type-ns, extended-type-ns) ).
- A simple web service operation returning an instance of ExtendedType
|In CXF 2.3.9||In CXF 2.7.5|
|In the generated XML Schema (from the WSDL), only one type (ExtendedType) is present, having attributes and elements of BaseType appearing therefore in extended-type-ns namespace||In the generated XML Schema (from the WSDL), the two types appear. One being an extension of the other. Therefore, elements from BaseType are in the base-type-ns namespace|
|In generated XML Schema, BaseType attributes are present twice: in the BaseType type definition but also in the ExtendedType definition. That generates invalid xml message, the same (unqualified) attribute being written twice...|
First "behavior change" (element from super type that have a different namespace now) has also been reported by others (cf this), but doesn't look like very problematic.
I mean, the new behavior is somewhat logical and it is what anyone would expect.
But, the wrong handling of base type attributes is more than annoying, as non invalid xml is generated...
In order to help regarding the resolution of this issue, I have written:
- A small standalone maven project illustrating the test case described above and emphasizing the difference between 2.3.9 and 2.7.5 version,
- a patch (for 2.7.x-fixes branch) to "enrich" the existing aegis databing inheritance testcase so that the attributes appearing twice are detected,
- a patch (for 2.7.x-fixes branch) with a proposed quick fix for this issue. (To be stricly reviewed)
(I just need to find a way to attach them to this issue )