The
xml file "convertedString" in the below example does not have namespace so when it
unrmarshal's this xml, there are no values inside Foo object. If I manually add
namespace to the xml "convertedString" it works. Is there any way to add namespace to the
UnMarshaller???
JAXBContext jc = JAXBContext.newInstance("com.foo.bar");
Unmarshaller u = jc.createUnmarshaller();
JAXBElement<Foo> root = u.unmarshal(new StreamSource(new StringReader(convertedString)),
Foo.class);