« Return to Thread: Namespace usage and xsd:any element problem

Namespace usage and xsd:any element problem

by Fernando González :: Rate this Message:

Reply to Author | View in Thread

Hi,

I'm using JAXB to generate XML using different context directories as context path and I'm having a strange behavior. The application I'm building reads and writes XML fine, but I get no namespace prefix in the XML. However, when I run the same code from an unit test it generates XML's with namespace prefix in some of nodes (corresponding to a "any" element in the schema). As a result, test cases cannot map the XML files produced by the application to the objects JAXB generated but to a default NSElement (I think it's something from the parser). The context path is identical in both cases.

I would like to know which is the JAXB policy for namespace usage. Any hint would be appreciated.

Greetings,
Fernando

 « Return to Thread: Namespace usage and xsd:any element problem

LightInTheBox - Buy quality products at wholesale price!