title: How can I use simple in a camel choice component when the message is in XML format?
body: <p>I have the following statement in camel:</p>
  
  <pre><code>      &lt;setProperty propertyName="REASON_FOR_CHANGE"&gt;&lt;simple&gt;${body.header.EventName} + ' ' + ${body.header.RolledbackEvent}&lt;/simple&gt;&lt;/setProperty&gt;
  </code></pre>
  
  <p>I am receiving an error along these lines when that statement is reached in the camel route:</p>
  
  <pre><code>  org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to invoke method: .header.EventName on null due to: org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to invoke method: header on null due to: org.apache.camel.component.bean.MethodNotFoundException: Method with name: header not found on bean: &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Event&gt;
  &lt;Header&gt;
  &lt;EventName&gt;Foo&lt;/EventName&gt;
  &lt;RolledbackEvent&gt;Bar&lt;/RolledbackEvent&gt;
  &lt;Action&gt;XFR&lt;/Action&gt;
  &lt;Effective&gt;2015-01-26T00:00:00.000&lt;/Effective&gt;
  &lt;/Header&gt;
  &lt;Message&gt;
  &lt;FirstName&gt;John&lt;/FirstName&gt;
  &lt;LastName&gt;Doe&lt;/LastName&gt;
  &lt;/Message&gt;
  &lt;/Event&gt;
  </code></pre>
  
  <p>I found this link while googling: <a href="https://www.talendforge.org/forum/viewtopic.php?id=36754" rel="nofollow">https://www.talendforge.org/forum/viewtopic.php?id=36754</a></p>
  
  <p>My understanding from that link is that my data is in the incorrect format for Simple to process and that Simple doesn't understand XML.</p>
  
  <p>I'd greatly prefer not having to use XPath, and I already have annotated JAXB classes for this XML object.  The XML can be deserialized and reserialized in the custom processors.  </p>
  
  <p>Is manual type conversion sometimes required when using different expression languages?  I understand some cases like CSV processing that would have to be true, but for different object notation languages too?</p>
  
  <p>Is there a way to make camel do type conversion of the xml to a java object for the purpose of using Simple or is there a better expression language for this purpose?</p>