Example usage for org.springframework.oxm.jaxb Jaxb2Marshaller setBeanClassLoader

List of usage examples for org.springframework.oxm.jaxb Jaxb2Marshaller setBeanClassLoader

Introduction

In this page you can find the example usage for org.springframework.oxm.jaxb Jaxb2Marshaller setBeanClassLoader.

Prototype

@Override
    public void setBeanClassLoader(ClassLoader classLoader) 

Source Link

Usage

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;
}