} else {
writeObject(marshaller, source, newJAXBElement(elName, cls, mObj));
}
} else if (byte[].class == cls && part.getTypeQName() != null
&& part.getTypeQName().getLocalPart().equals("hexBinary")) {
mObj = new HexBinaryAdapter().marshal((byte[])mObj);
writeObject(marshaller, source, newJAXBElement(elName, String.class, mObj));
} else if (mObj instanceof JAXBElement) {
writeObject(marshaller, source, mObj);
} else if (marshaller.getSchema() != null) {
//force xsi:type so types can be validated instead of trying to