public class JAXBDSContext extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG_ENABLED |
Constructor and Description |
---|
JAXBDSContext(JAXBContext jaxbContext)
"Dispatch" Constructor
Use this full constructor when the JAXBContent is provided by the
customer.
|
JAXBDSContext(String contextPackage)
Deprecated.
|
JAXBDSContext(TreeSet<String> packages)
Slightly slower constructor
|
JAXBDSContext(TreeSet<String> packages,
String packagesKey)
Full Constructor JAXBDSContext (most performant)
|
Modifier and Type | Method and Description |
---|---|
protected AttachmentMarshaller |
createAttachmentMarshaller(XMLStreamWriter writer)
Create an AttachmentMarshaller to marshal MTOM/SWA Attachments
|
protected AttachmentUnmarshaller |
createAttachmentUnmarshaller(org.apache.axiom.util.stax.xop.MimePartProvider mimePartProvider)
Create an Attachment unmarshaller for unmarshalling MTOM/SWA Attachments
|
ClassLoader |
getClassLoader() |
JAXBUtils.CONSTRUCTION_TYPE |
getConstructionType() |
TreeSet<String> |
getContextPackages() |
JAXBContext |
getJAXBContext() |
JAXBContext |
getJAXBContext(ClassLoader cl) |
JAXBContext |
getJAXBContext(ClassLoader cl,
boolean forceArrays) |
MessageContext |
getMessageContext() |
Class |
getProcessType() |
boolean |
isxmlList() |
void |
marshal(Object obj,
XMLStreamWriter writer)
Marshal the jaxb object
|
void |
setIsxmlList(boolean isxmlList) |
void |
setMessageContext(MessageContext messageContext) |
void |
setProcessType(Class type)
The procesess type to indicate the class of the target of the unmarshaling.
|
void |
setWebServiceNamespace(String namespace) |
Object |
unmarshal(XMLStreamReader inputReader)
Unmarshal the xml into a JAXB object
|
static Object |
unmarshalAsListOrArray(XMLStreamReader reader,
Unmarshaller u,
Class type)
convert the String into a list or array
|
static Object |
unmarshalByElement(Unmarshaller u,
XMLStreamReader reader)
Preferred way to unmarshal objects
|
static Object |
unmarshalByType(Unmarshaller u,
XMLStreamReader reader,
Class type,
boolean isList,
JAXBUtils.CONSTRUCTION_TYPE ctype)
The root element being read is defined by schema/JAXB; however its contents are known by
schema/JAXB.
|
public JAXBDSContext(TreeSet<String> packages, String packagesKey)
packages
- Set of packages needed by the JAXBContext.public JAXBDSContext(TreeSet<String> packages)
packages
- public JAXBDSContext(String contextPackage)
contextPackage
- public JAXBDSContext(JAXBContext jaxbContext)
jaxbContext
- public TreeSet<String> getContextPackages()
public JAXBContext getJAXBContext() throws JAXBException
JAXBException
public JAXBContext getJAXBContext(ClassLoader cl) throws JAXBException
JAXBException
public JAXBContext getJAXBContext(ClassLoader cl, boolean forceArrays) throws JAXBException
ClassLoader
- forceArrays
- boolean (if true, then JAXBContext will automatically contain arrays)JAXBException
public void setWebServiceNamespace(String namespace)
public Class getProcessType()
public void setProcessType(Class type)
type
- public JAXBUtils.CONSTRUCTION_TYPE getConstructionType()
public boolean isxmlList()
public void setIsxmlList(boolean isxmlList)
public MessageContext getMessageContext()
public void setMessageContext(MessageContext messageContext)
public ClassLoader getClassLoader()
protected AttachmentMarshaller createAttachmentMarshaller(XMLStreamWriter writer)
writer
- protected AttachmentUnmarshaller createAttachmentUnmarshaller(org.apache.axiom.util.stax.xop.MimePartProvider mimePartProvider)
public Object unmarshal(XMLStreamReader inputReader) throws JAXBException
inputReader
- JAXBException
public void marshal(Object obj, XMLStreamWriter writer) throws JAXBException
obj
- writer
- am
- AttachmentMarshaller, optional AttachmentJAXBException
public static Object unmarshalByType(Unmarshaller u, XMLStreamReader reader, Class type, boolean isList, JAXBUtils.CONSTRUCTION_TYPE ctype) throws WebServiceException
u
- Unmarshallerreader
- XMLStreamReadertype
- ClassWebServiceException
public static Object unmarshalAsListOrArray(XMLStreamReader reader, Unmarshaller u, Class type) throws IllegalAccessException, ParseException, NoSuchMethodException, InstantiationException, DatatypeConfigurationException, InvocationTargetException, JAXBException
T
- jaxb
- type
- IllegalAccessException
ParseException
NoSuchMethodException
InstantiationException
DatatypeConfigurationException
InvocationTargetException
JAXBException
public static Object unmarshalByElement(Unmarshaller u, XMLStreamReader reader) throws WebServiceException
u
- Unmarshallerreader
- XMLStreamReaderWebServiceException
Copyright © 2004-2015 The Apache Software Foundation. All Rights Reserved.