ObjectToXml (Mule ESB 2.2.1 API)
Keywords: org.mule.module.xml.transformer.ObjectToXml class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mule.module.xml.transformer
Class ObjectToXml

    java.lang.Object
      org.mule.transformer.AbstractTransformer
          org.mule.transformer.AbstractMessageAwareTransformer
              org.mule.module.xml.transformer.AbstractXStreamTransformer
                  org.mule.module.xml.transformer.ObjectToXml

All Implemented Interfaces:
  Initialisable, NamedObject, BaseTransformer, Transformer

    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.

Field Summary

Fields inherited from class org.mule.transformer.AbstractTransformer
`DEFAULT_TRUNCATE_LENGTH, endpoint, logger, name, returnClass, sourceTypes`

Fields inherited from interface org.mule.api.lifecycle.Initialisable
`PHASE_NAME`

Constructor Summary
`ObjectToXml()`

Method Summary
`boolean` | `isAcceptMuleMessage()`
`void` | `setAcceptMuleMessage(boolean value)`
`Object` | `transform(MuleMessage message, String outputEncoding)`

Methods inherited from class org.mule.module.xml.transformer.AbstractXStreamTransformer
`clone, getAliases, getConverters, getDriverClassName, getXStream, requiresCurrentEvent, setAliases, setConverters, setDriverClassName`

Methods inherited from class org.mule.transformer.AbstractMessageAwareTransformer
`doTransform, isSourceTypeSupported`

Methods inherited from class org.mule.transformer.AbstractTransformer
`checkReturnClass, generateTransformerName, getEndpoint, getName, getReturnClass, getSourceTypes, initialise, isAcceptNull, isConsumed, isIgnoreBadInput, isSourceTypeSupported, registerSourceType, setEndpoint, setIgnoreBadInput, setName, setReturnClass, toString, transform, unregisterSourceType`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ObjectToXml

    public ObjectToXml()

Method Detail

### isAcceptMuleMessage

    public boolean isAcceptMuleMessage()

### setAcceptMuleMessage

    public void setAcceptMuleMessage(boolean value)

### transform

    public Object transform(MuleMessage message,
                            String outputEncoding)
                     throws TransformerException

  Specified by:
    `transform` in class `AbstractMessageAwareTransformer`
  Throws:
    `TransformerException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.