|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.camel.impl.ServiceSupport
org.apache.camel.converter.jaxb.JaxbDataFormat
org.apache.camel.dataformat.soap.SoapJaxbDataFormat
public class SoapJaxbDataFormat
Marshaling from Objects to SOAP and back by using JAXB. The classes to be processed need to have JAXB annotations. For marshaling a ElementNameStrategy is used to determine how the top level elements in SOAP are named as this can not be extracted from JAXB.
| Field Summary | |
|---|---|
protected org.slf4j.Logger |
log
|
static String |
SOAP_UNMARSHALLED_HEADER_LIST
|
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
protected void |
checkElementNameStrategy(Exchange exchange)
|
protected JAXBContext |
createContext()
Added the generated SOAP package to the JAXB context so Soap datatypes are available |
void |
marshal(Exchange exchange,
Object inputObject,
OutputStream stream)
Marshal inputObjects to SOAP xml. |
void |
setElementNameStrategy(ElementNameStrategy elementNameStrategy)
|
void |
setElementNameStrategy(Object nameStrategy)
|
void |
setElementNameStrategyRef(String nameStrategyRef)
|
void |
setIgnoreUnmarshalledHeaders(boolean ignoreHeaders)
|
Object |
unmarshal(Exchange exchange,
InputStream stream)
Unmarshal a given SOAP xml stream and return the content of the SOAP body |
| Methods inherited from class org.apache.camel.converter.jaxb.JaxbDataFormat |
|---|
doStart, doStop, getCamelContext, getContext, getContextPath, getEncoding, getPartClass, getPartNamespace, isFilterNonXmlChars, isFragment, isIgnoreJAXBElement, isPrettyPrint, needFiltering, setCamelContext, setContext, setContextPath, setEncoding, setFilterNonXmlChars, setFragment, setIgnoreJAXBElement, setPartClass, setPartNamespace, setPrettyPrint |
| Methods inherited from class org.apache.camel.impl.ServiceSupport |
|---|
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, start, stop, suspend |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SOAP_UNMARSHALLED_HEADER_LIST
protected final transient org.slf4j.Logger log
| Constructor Detail |
|---|
public SoapJaxbDataFormat()
public SoapJaxbDataFormat(String contextPath)
contexPath -
public SoapJaxbDataFormat(String contextPath,
ElementNameStrategy elementNameStrategy)
contextPath - package for JAXB contextserviceInterface - webservice interface
public SoapJaxbDataFormat(String contextPath,
String elementNameStrategyRef)
contextPath - package for JAXB contextelementNameStrategyRef - webservice interface referenced bean name| Method Detail |
|---|
public void setElementNameStrategy(Object nameStrategy)
public void setIgnoreUnmarshalledHeaders(boolean ignoreHeaders)
protected void checkElementNameStrategy(Exchange exchange)
public void marshal(Exchange exchange,
Object inputObject,
OutputStream stream)
throws IOException
marshal in interface DataFormatmarshal in class JaxbDataFormatexchange - the current exchangeinputObject - the object to be marshalledstream - the output stream to write the marshalled result to
IOException
public Object unmarshal(Exchange exchange,
InputStream stream)
throws IOException
unmarshal in interface DataFormatunmarshal in class JaxbDataFormatexchange - the current exchangestream - the input stream with the object to be unmarshalled
IOException
protected JAXBContext createContext()
throws JAXBException
createContext in class JaxbDataFormatJAXBExceptionpublic void setElementNameStrategy(ElementNameStrategy elementNameStrategy)
public void setElementNameStrategyRef(String nameStrategyRef)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||