cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanjin Tulac (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-7186) Aegis DataBinding ignores JAXB annotations on a field
Date Tue, 20 Dec 2016 19:58:58 GMT

    [ https://issues.apache.org/jira/browse/CXF-7186?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15765105#comment-15765105
] 

Sanjin Tulac commented on CXF-7186:
-----------------------------------

We're using Aegis primarily for historical reasons - development of CodeObjects "model-driven"
application-development platform started back in 2006 when CXF was XFire and (AFAIK) JAXB
was not yet a viable option. We have customized serialization of  SDO-based data, so moving
to JAXB data binding would require unknown amount of work and has significant risks associated
with it.

But it does seem at this point as if we'd be better off switching to JAXB databinding, especially
for this particular use case, where we need to implement against 3rd party XML schema.

> Aegis DataBinding ignores JAXB annotations on a field
> -----------------------------------------------------
>
>                 Key: CXF-7186
>                 URL: https://issues.apache.org/jira/browse/CXF-7186
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.7.18, 3.1.9, 3.0.12
>            Reporter: Sanjin Tulac
>         Attachments: CXF Aegis Data Binding.png, CXF-7186.patch
>
>
> I've been trying to use CXF with Aegis DataBinding to host a web service that needs to
be called by a 3rd party, using 3rd party's XML schema.
> It turns out that 3rd party XML schema has a naming convention that element names start
with upper case. wsdl2java correctly placed JAXB XMLElement annotations on the fields in the
generated POJOs, But at run-time, Aegis DataBinding ignores these JAXB annotations on the
fields, which causes the XML from 3rd party to be ignored, instead of converted to the generated
POJOs.
> I've identified the culprit to be org.apache.cxf.aegist.type.AnnotatedTypeInfo class,
whose method createQName only looks for annotations on the getter methods, but ignores annotations
on fields.
> I can see that this defect stems from the attempt to support both Aegis and JAXB annotations:
former expect annotations on the getter methods, but latter however, even though quite similar,
expect annotations on the field.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message