Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Excerpt

Convert the message body to the given class type

. To do so camel uses a hierarchy of TypeConverters

Syntax

Java

Wiki MarkupconvertBodyTo(Class type \ [, String charset\])

Spring XML

Wiki Markup<convertBodyto <convertBodyTo type="<String>" \ [charset="<String>"\] >

Parameters

Parameter

Type

Description

type

Class

Class type to convert to. For spring dsl use the Fully qualified name

charset

String

charset name for conversions from byte to String

...

Code Block
convertBodyTo(String.class)

Spring XML Schema

...

Code Block
<convertBodyTo type="java.lang.String"/>

...