Abstract base class for implementations of the Marshaller and Unmarshaller interfaces that
use JAXB. This base class is responsible for creating JAXB marshallers from a JAXBContext.
JAXB 2.0 added breaking API changes, so specific subclasses must be used for JAXB 1.0 and 2.0
(Jaxb1Marshaller and Jaxb2Marshaller respectivaly).
author: Arjen Poutsma See Also:Jaxb1Marshaller See Also:Jaxb2Marshaller since: 1.0.0
convertJaxbException(JAXBException ex) Convert the given JAXBException to an appropriate exception from the
org.springframework.oxm hierarchy.
The default implementation delegates to JaxbUtils.
Convert the given JAXBException to an appropriate exception from the
org.springframework.oxm hierarchy.
The default implementation delegates to JaxbUtils. Can be overridden in subclasses.
Parameters: ex - JAXBException that occured the corresponding XmlMappingException instance See Also:JaxbUtils.convertJaxbException
Template method that can be overridden by concrete JAXB marshallers for custom initialization behavior. Gets
called after creation of JAXB Marshaller, and after the respective properties have been set.
Default implementation does nothing.
Template method that can overridden by concrete JAXB marshallers for custom initialization behavior. Gets called
after creation of JAXB Unmarshaller, and after the respective properties have been set.
Default implementation does nothing.
setContextPath
public void setContextPath(String contextPath)(Code)
Sets the JAXB Context path.
setMarshallerProperties
public void setMarshallerProperties(Map properties)(Code)
Sets the JAXB validation event handler. This event handler will be called by JAXB if any validation errors are
encountered during calls to any of the marshal API's.
Parameters: validationEventHandler - the event handler