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 AttachmentContext |
createAttachmentContext() |
ClassLoader |
getClassLoader() |
JAXBUtils.CONSTRUCTION_TYPE |
getConstructionType() |
TreeSet<String> |
getContextPackages() |
JAXBContext |
getJAXBContext() |
JAXBContext |
getJAXBContext(ClassLoader cl) |
JAXBContext |
getJAXBContext(ClassLoader cl,
boolean forceArrays) |
org.apache.axis2.context.MessageContext |
getMessageContext() |
Class<?> |
getProcessType() |
boolean |
isxmlList() |
void |
marshal(Object obj,
XMLStreamWriter writer)
Marshal the jaxb object
|
void |
setIsxmlList(boolean isxmlList) |
void |
setMessageContext(org.apache.axis2.context.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(org.apache.axiom.om.OMElement element)
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
JAXBExceptionpublic JAXBContext getJAXBContext(ClassLoader cl) throws JAXBException
JAXBExceptionpublic JAXBContext getJAXBContext(ClassLoader cl, boolean forceArrays) throws JAXBException
ClassLoader - forceArrays - boolean (if true, then JAXBContext will automatically contain arrays)JAXBExceptionpublic 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 org.apache.axis2.context.MessageContext getMessageContext()
public void setMessageContext(org.apache.axis2.context.MessageContext messageContext)
public ClassLoader getClassLoader()
protected AttachmentContext createAttachmentContext()
public Object unmarshal(org.apache.axiom.om.OMElement element) throws JAXBException
element - JAXBExceptionpublic void marshal(Object obj, XMLStreamWriter writer) throws JAXBException
obj - writer - am - AttachmentMarshaller, optional AttachmentJAXBExceptionpublic static Object unmarshalByType(Unmarshaller u, XMLStreamReader reader, Class<?> type, boolean isList, JAXBUtils.CONSTRUCTION_TYPE ctype) throws WebServiceException
u - Unmarshallerreader - XMLStreamReadertype - ClassWebServiceExceptionpublic static Object unmarshalAsListOrArray(XMLStreamReader reader, Unmarshaller u, Class<?> type) throws IllegalAccessException, ParseException, NoSuchMethodException, InstantiationException, DatatypeConfigurationException, InvocationTargetException, JAXBException
T - jaxb - type - IllegalAccessExceptionParseExceptionNoSuchMethodExceptionInstantiationExceptionDatatypeConfigurationExceptionInvocationTargetExceptionJAXBExceptionpublic static Object unmarshalByElement(Unmarshaller u, XMLStreamReader reader) throws WebServiceException
u - Unmarshallerreader - XMLStreamReaderWebServiceExceptionCopyright © 2004–2020 The Apache Software Foundation. All rights reserved.