ou would normally marshall a JAXB object to it’s XML String form by something similar to:
This assumes that the object is annotated with the JAXB @XmlRootElement annotation. If it is not, then you have to create a root element for it, by something like:
marshaller.marshal(new JAXBElement<TLOGenericSearchInput>(new QName("", "rootTag"), TLOGenericSearchInput.class, searchInput), stringWriter);
You have to create the root element for the object. In this case, the root element is going to be called “rootTag”.
sheltonn March 13th, 2012