use of eu.bcvsolutions.idm.core.api.jaxb.JaxbCharacterEscapeEncoder in project CzechIdMng by bcvsolutions.
the class DefaultIdmScriptService method initJaxbMarshaller.
/**
* Create instance of JaxbMarshaller and set required properties to him.
*
* @return
*/
private Marshaller initJaxbMarshaller() {
Marshaller jaxbMarshaller = null;
try {
jaxbMarshaller = jaxbContext.createMarshaller();
jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
jaxbMarshaller.setProperty(Marshaller.JAXB_ENCODING, StandardCharsets.UTF_8.name());
jaxbMarshaller.setProperty(ENCODING_HANDLER, new JaxbCharacterEscapeEncoder());
} catch (JAXBException e) {
throw new ResultCodeException(CoreResultCode.XML_JAXB_INIT_ERROR, e);
}
return jaxbMarshaller;
}
use of eu.bcvsolutions.idm.core.api.jaxb.JaxbCharacterEscapeEncoder in project CzechIdMng by bcvsolutions.
the class DefaultIdmNotificationTemplateService method initJaxbMarshaller.
/**
* Create instance of JaxbMarshaller and set required properties to him.
*
* @return
*/
private Marshaller initJaxbMarshaller() {
Marshaller jaxbMarshaller = null;
try {
jaxbMarshaller = jaxbContext.createMarshaller();
jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
jaxbMarshaller.setProperty(Marshaller.JAXB_ENCODING, StandardCharsets.UTF_8.name());
jaxbMarshaller.setProperty(ENCODING_HANDLER, new JaxbCharacterEscapeEncoder());
} catch (JAXBException e) {
throw new ResultCodeException(CoreResultCode.XML_JAXB_INIT_ERROR, e);
}
return jaxbMarshaller;
}
use of eu.bcvsolutions.idm.core.api.jaxb.JaxbCharacterEscapeEncoder in project CzechIdMng by bcvsolutions.
the class AbstractRecoverableService method initJaxbMarshaller.
/**
* Create instance of JaxbMarshaller and set required properties to him.
*
* @return
*/
protected Marshaller initJaxbMarshaller() {
Marshaller jaxbMarshaller = null;
try {
jaxbMarshaller = jaxbContext.createMarshaller();
jaxbMarshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
jaxbMarshaller.setProperty(Marshaller.JAXB_ENCODING, StandardCharsets.UTF_8.name());
jaxbMarshaller.setProperty(ENCODING_HANDLER, new JaxbCharacterEscapeEncoder());
} catch (JAXBException e) {
throw new ResultCodeException(CoreResultCode.XML_JAXB_INIT_ERROR, e);
}
return jaxbMarshaller;
}
Aggregations