List of usage examples for org.springframework.oxm.jaxb Jaxb2Marshaller setBeanClassLoader
@Override public void setBeanClassLoader(ClassLoader classLoader)
From source file:org.springsource.greenbeans.examples.edawithspring.etailer.common.MarshallingTests.java
private Marshaller jaxb2Marshaller() throws Exception { Jaxb2Marshaller jaxb2Marshaller = new Jaxb2Marshaller(); jaxb2Marshaller.setClassesToBeBound(PurchaseProcessingRequest.class, PurchaseLineItem.class); jaxb2Marshaller.setSchema(new ClassPathResource("/partner-schema.xsd")); jaxb2Marshaller.afterPropertiesSet(); jaxb2Marshaller.setBeanClassLoader(Thread.currentThread().getContextClassLoader()); return jaxb2Marshaller; }