[
https://issues.apache.org/jira/browse/CXF-2041?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Kariem Hussein updated CXF-2041:
--------------------------------
Attachment: test-cxf-xmltransient.zip
Test case as maven project
> XmlTransient annotation seems to be ignored
> -------------------------------------------
>
> Key: CXF-2041
> URL: https://issues.apache.org/jira/browse/CXF-2041
> Project: CXF
> Issue Type: Bug
> Components: JAXB Databinding
> Affects Versions: 2.1.4
> Environment: Spring 2.5.6
> Reporter: Kariem Hussein
> Attachments: test-cxf-xmltransient.zip
>
>
> Properties marked with @XmlTransient should be prevented from being mapped
> to XML. For two objects with a parent-child relationship where the object
> references are bi-directional, properties annotated accordingly should be
> ignored during marshalling. I have tried different options, but could never
> observe that @XmlTransient is actually taken into account.
> # examples in peudo-code (test project will be attached)
> Models:
> class Parent {
> List<Child> children;
> }
> class Child {
> @XmlTransient // <-- annotated to exclude this property from XML
> marshalling
> Parent parent;
> }
> Test:
> testMarshalling {
> Parent p = new Parent();
> Child c = new Child();
> c.setParent(p);
> p.setChildren(Arrays.asList(c));
> doSomethingViaWebService(p); // <-- throws Exception here
> }
> I could imagine that some problems arise when using another spring version
> than the one packaged with CXF, but I think there should not be issues in
> such a limited scenario. Either the documentation is missing important
> parameters or there is actually a problem somewhere.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.