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