| Summary: | Chained @XmlValue properties not working correctly | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Blaise Doughan <blaise.doughan> | ||||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||||
| Status: | CLOSED DUPLICATE | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | eclipselink.oxm-inbox | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 208964 [details]
MOXy - Test Cases
Created attachment 208965 [details]
Core - Fix
*** This bug has been marked as a duplicate of bug 368283 *** The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
Issue sent in via email: In the RI, the output element has the value of the inner text. In MOXy I get a rather strange output: <top><middle><text()>Some Value</text()></middle></top> When I’m expecting <top><middle>Some Value</middle></top> In this case I have the following three classes: @XmlRootElement public class Top { @XmlElement public Middle middle; public String toString() { return "Top(" + middle + ")"; } } public class Middle { @XmlValue public Bottom bottom; public String toString() { return "Middle(" + bottom + ")"; } } public class Bottom { @XmlValue public String value; public String toString() { return "Bottom(" + value + ")"; } } And the following testing harness: JAXBContext c = JAXBContext.newInstance(Top.class); System.err.println(c.getClass()); Marshaller m = c.createMarshaller(); Top t = new Top(); t.middle = new Middle(); t.middle.bottom = new Bottom(); t.middle.bottom.value = "Some Value"; FileOutputStream out = new FileOutputStream("c:\\temp\\t.xml"); m.marshal(t, out); out.close(); Unmarshaller u = c.createUnmarshaller(); Top tu = (Top) u.unmarshal(new File("c:\\temp\\t.xml")); System.err.println(tu);