|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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.
| 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. |
|
| 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 inputObject to SOAP xml. |
void |
setElementNameStrategy(ElementNameStrategy elementNameStrategy)
|
void |
setElementNameStrategy(Object nameStrategy)
|
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 |
|---|
getContext, getContextPath, getEncoding, getPartClass, getPartNamespace, isFilterNonXmlChars, isIgnoreJAXBElement, isPrettyPrint, needFiltering, setContext, setContextPath, setEncoding, setFilterNonXmlChars, setIgnoreJAXBElement, setPartClass, setPartNamespace, setPrettyPrint |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SoapJaxbDataFormat()
public SoapJaxbDataFormat(String contextPath)
contexPath -
public SoapJaxbDataFormat(String contextPath,
ElementNameStrategy elementNameStrategy)
jaxbPackage - package for JAXB contextserviceInterface - webservice interface| Method Detail |
|---|
public void setElementNameStrategy(Object nameStrategy)
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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||