* @return the JAXB object
* @throws JAXBException
* if an error occurs while unmarshalling
*/
public static Object unmarshal(JAXBContext context, OMElement element, boolean cache) throws JAXBException {
UnmarshallerAdapter adapter = org.apache.axiom.util.jaxb.JAXBUtils.getUnmarshallerAdapter(
element.getXMLStreamReader(cache));
Unmarshaller unmarshaller = context.createUnmarshaller();
unmarshaller.setAttachmentUnmarshaller(adapter.getAttachmentUnmarshaller());
return unmarshaller.unmarshal(adapter.getReader());
}