How to set 'MODE' in <dataformat> with Bluprint DSL ?

Solution Verified - Updated -


   <xstream driverRef="jsonDriver" encoding="UTF-8" id="jsonConverter" mode="NO_REFERENCES"></xstream>

  • The 'Mode' can be set with Java DSL as below,
public void setMode(String mode) {
                if ("NO_REFERENCES".equalsIgnoreCase(mode)) {
                        this.mode = XStream.NO_REFERENCES;
                } else if ("ID_REFERENCES".equalsIgnoreCase(mode)) {
                        this.mode = XStream.ID_REFERENCES;
                } else if ("XPATH_RELATIVE_REFERENCES".equalsIgnoreCase(mode)) {
                        this.mode = XStream.XPATH_RELATIVE_REFERENCES;
                } else if ("XPATH_ABSOLUTE_REFERENCES".equalsIgnoreCase(mode)) {
                        this.mode = XStream.XPATH_ABSOLUTE_REFERENCES;
                } else if ("SINGLE_NODE_XPATH_RELATIVE_REFERENCES".equalsIgnoreCase(mode)) {
                        this.mode = XStream.SINGLE_NODE_XPATH_RELATIVE_REFERENCES;
                } else if ("SINGLE_NODE_XPATH_ABSOLUTE_REFERENCES".equalsIgnoreCase(mode)) {
                        this.mode = XStream.SINGLE_NODE_XPATH_ABSOLUTE_REFERENCES;
  • But with blueprint, there no 'Mode' parameter called as in the Java DSL using the camel-xstream component,
<bean id="jsonDriver"

<camelContext id="camel" xmlns=";;
    <xstream id="xstream" driverRef="jsonDriver"></xstream>            

    <from uri="direct:start"></from>
    <marshal ref="xstream"></marshal>
    <to uri="mock:result"></to>


  • Red Hat JBoss Fuse
    • 6.x
  • Apache Camel
  • Apache Aries Blueprint

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content