Here is an example / template for marshalling entity to String:
Marshalling code fragment
java.io.StringWriter sw = new StringWriter();
JAXBContext pContext = JAXBContext.newInstance(SomeEntity.class);
Marshaller marshaller = pContext.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
marshaller.marshal(dto, sw);
sw.toString();
SomeEntity.java
@XmlRootElement(name = "result")
@XmlAccessorType(XmlAccessType.FIELD)
public class SomeEntity{
private String someVar;
private String someOtherVal;
...
// getters & setters
}
Iron Dog's teeth implants to replace a spade
ReplyDeleteIron Dog's oakley titanium sunglasses teeth were designed to replace a spade. titanium scooter bars I used this razor as my first nano titanium ionic straightening iron one and wanted titanium straightener to use this 2019 ford fusion hybrid titanium new device instead.
p546b0ydzzd506 women sex toys,wolf dildo,dog dildo,horse dildo,couples sexy toys,love dolls,wholesale sex toys,dildos,sex toys l528w5ywswr942
ReplyDelete