public class ObjectToXml extends AbstractXStreamTransformer
ObjectToXml converts any object to XML using Xstream. Xstream uses
some clever tricks so objects that get marshalled to XML do not need to implement
any interfaces including Serializable and you don't even need to specify a default
constructor. If MuleMessage is configured as a source type on this
transformer by calling setAcceptMuleMessage(true) then the MuleMessage
will be serialised. This is useful for transports such as TCP where the message
headers would normally be lost.encoding, endpoint, logger, mimeType, MULE_MESSAGE_DATA_TYPE, muleContext, name, returnType, sourceTypesPHASE_NAMEPHASE_NAMEPROPERTY_NAME| Constructor and Description |
|---|
ObjectToXml() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isAcceptMuleMessage() |
void |
setAcceptMuleMessage(boolean value) |
Object |
transformMessage(MuleMessage message,
String outputEncoding) |
addAlias, addConverter, clone, getAliases, getConverters, getDriverClass, getXStream, initialise, removeAlias, removeAlias, setAliases, setConverters, setDriverClasscheckReturnClass, doTransform, isSourceDataTypeSupported, transform, transform, transformdispose, generateTransformerName, getEncoding, getEncoding, getEndpoint, getMimeType, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isAllowNullReturn, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, process, registerSourceType, registerSourceType, setAllowNullReturn, setEncoding, setEndpoint, setIgnoreBadInput, setMimeType, setMuleContext, setName, setReturnClass, setReturnDataType, toString, transform, unregisterSourceType, unregisterSourceTypegetAnnotation, getAnnotations, setAnnotationsequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetEncoding, getEndpoint, getMimeType, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isIgnoreBadInput, isSourceDataTypeSupported, isSourceTypeSupported, setReturnClass, setReturnDataType, transformprocessdisposesetNamegetNamesetMuleContextsetEndpointpublic boolean isAcceptMuleMessage()
public void setAcceptMuleMessage(boolean value)
public Object transformMessage(MuleMessage message, String outputEncoding) throws TransformerException
transformMessage in class AbstractMessageTransformerTransformerExceptionCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.