public class SoapJaxbDataFormat
extends org.apache.camel.converter.jaxb.JaxbDataFormat
Modifier and Type | Field and Description |
---|---|
static String |
SOAP_UNMARSHALLED_HEADER_LIST |
Constructor and Description |
---|
SoapJaxbDataFormat()
Remember to set the context path when using this constructor
|
SoapJaxbDataFormat(String contextPath)
Initialize with JAXB context path
|
SoapJaxbDataFormat(String contextPath,
ElementNameStrategy elementNameStrategy)
Initialize the data format.
|
SoapJaxbDataFormat(String contextPath,
String elementNameStrategyRef)
Initialize the data format.
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkElementNameStrategy(org.apache.camel.Exchange exchange) |
protected List<Object> |
createContentFromObject(Object inputObject,
String soapAction,
List<Object> headerElements)
Create body content from a non Exception object.
|
protected JAXBContext |
createContext()
Added the generated SOAP package to the JAXB context so Soap datatypes
are available
|
protected void |
doStart() |
String |
getDataFormatName() |
ElementNameStrategy |
getElementNameStrategy() |
String |
getElementNameStrategyRef() |
String |
getVersion() |
boolean |
isIgnoreUnmarshalledHeaders() |
void |
marshal(org.apache.camel.Exchange exchange,
Object inputObject,
OutputStream stream)
Marshal inputObjects to SOAP xml.
|
void |
setElementNameStrategy(Object nameStrategy) |
void |
setElementNameStrategyRef(String elementNameStrategyRef) |
void |
setIgnoreUnmarshalledHeaders(boolean ignoreUnmarshalledHeaders) |
void |
setVersion(String version) |
Object |
unmarshal(org.apache.camel.Exchange exchange,
InputStream stream)
Unmarshal a given SOAP xml stream and return the content of the SOAP body
|
createMarshaller, createSchemaFactory, createUnmarshaller, doStop, getCamelContext, getContext, getContextPath, getEncoding, getJaxbProviderProperties, getNamespacePrefix, getNamespacePrefixRef, getNoNamespaceSchemaLocation, getPartClass, getPartNamespace, getSchema, getSchemaFactory, getSchemaLocation, getXmlStreamWriterWrapper, isFilterNonXmlChars, isFragment, isIgnoreJAXBElement, isMustBeJAXBElement, isObjectFactory, isPrettyPrint, needFiltering, setCamelContext, setContext, setContextPath, setEncoding, setFilterNonXmlChars, setFragment, setIgnoreJAXBElement, setJaxbProviderProperties, setMustBeJAXBElement, setNamespacePrefix, setNamespacePrefixRef, setNoNamespaceSchemaLocation, setObjectFactory, setPartClass, setPartNamespace, setPrettyPrint, setSchema, setSchemaFactory, setSchemaLocation, setXmlStreamWriterWrapper
public static final String SOAP_UNMARSHALLED_HEADER_LIST
public SoapJaxbDataFormat()
public SoapJaxbDataFormat(String contextPath)
public SoapJaxbDataFormat(String contextPath, ElementNameStrategy elementNameStrategy)
public String getDataFormatName()
getDataFormatName
in interface org.apache.camel.spi.DataFormatName
getDataFormatName
in class org.apache.camel.converter.jaxb.JaxbDataFormat
protected void doStart() throws Exception
doStart
in class org.apache.camel.converter.jaxb.JaxbDataFormat
Exception
protected void checkElementNameStrategy(org.apache.camel.Exchange exchange)
public void marshal(org.apache.camel.Exchange exchange, Object inputObject, OutputStream stream) throws IOException, SAXException
marshal
in interface org.apache.camel.spi.DataFormat
marshal
in class org.apache.camel.converter.jaxb.JaxbDataFormat
IOException,SAXException
IOException
SAXException
protected List<Object> createContentFromObject(Object inputObject, String soapAction, List<Object> headerElements)
inputObject
- object to be put into the SOAP bodysoapAction
- for name resolutionheaderElements
- in/out parameter used to capture header content if presentpublic Object unmarshal(org.apache.camel.Exchange exchange, InputStream stream) throws IOException, SAXException
unmarshal
in interface org.apache.camel.spi.DataFormat
unmarshal
in class org.apache.camel.converter.jaxb.JaxbDataFormat
IOException,SAXException
IOException
SAXException
protected JAXBContext createContext() throws JAXBException
createContext
in class org.apache.camel.converter.jaxb.JaxbDataFormat
JAXBException
public ElementNameStrategy getElementNameStrategy()
public void setElementNameStrategy(Object nameStrategy)
public String getElementNameStrategyRef()
public void setElementNameStrategyRef(String elementNameStrategyRef)
public boolean isIgnoreUnmarshalledHeaders()
public void setIgnoreUnmarshalledHeaders(boolean ignoreUnmarshalledHeaders)
public String getVersion()
getVersion
in interface org.apache.camel.StatefulService
getVersion
in class org.apache.camel.support.ServiceSupport
public void setVersion(String version)
Apache Camel