try {
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
unmarshaller.setProperty(UnmarshallerProperties.MEDIA_TYPE, MediaType.APPLICATION_XML);
unmarshaller.setProperty(UnmarshallerProperties.AUTO_DETECT_MEDIA_TYPE, true);
unmarshaller.setProperty(UnmarshallerProperties.JSON_INCLUDE_ROOT, false);
unmarshaller.setEventHandler(new DefaultValidationEventHandler());
if (metadata instanceof MetadataSource){
return ((MetadataSource)metadata).getXmlBindings(properties, classLoader);
}
JAXBElement<XmlBindings> bindingsJaxbElement = null;
if (metadata instanceof XMLEventReader) {