/**
* Get the current XMLEncoder
* @return XMLEncoder
*/
public static XMLEncoder getXMLEncoder(MessageContext msgContext) {
XMLEncoder encoder = null;
String encoding = getEncoding(null, msgContext);
try {
encoder = XMLEncoderFactory.getEncoder(encoding);
} catch (Exception e) {
log.error(Messages.getMessage("exception00"), e);