title: How to POST with XML type and get answer as java.lang.String in camel?
body: <p>I'm trying to make some small message translator to inject new type of data into existing system. To do it, I translate the new XML into internal class, do the operation, and the result I want to return as String. When I deploy the answer as XML there was no problem, but currently I get following error:</p>
  
  <pre><code>java.io.IOException: org.apache.camel.InvalidPayloadException: No body available of type: javax.xml.bind.JAXBElement but has value: 00 of type: java.lang.String on: Message: 00. Exchange[ID-60345-1455623194156-43-5][Message: 00]
  </code></pre>
  
  <p>I tried to replace produces type, outType, adjusting the Headers with setting the Content-Type to text/plain, but it doesent help. The original bindingMode was XML. My goal is to return simple string with POST method.</p>
  
  <pre><code>&lt;restConfiguration component="netty4-http" 
                    bindingMode="auto" 
                    contextPath="/WebServices/rest"
                    enableCORS="true"&gt;
     &lt;endpointProperty key="nettySharedHttpServer" value="#sharedNettyHttpServer"/&gt; 
     &lt;dataFormatProperty key="prettyPrint" value="false"/&gt;
  &lt;/restConfiguration&gt;
  
  &lt;!-- defines the rest services using the context-path /user --&gt;
  &lt;rest path="/service" 
       consumes="application/xml" 
       produces="text/plain"&gt;
     &lt;description&gt;REST service&lt;/description&gt;
  
     &lt;post uri="/request" 
           type="org.company.generated.VmML" 
           outType="java.lang.String"&gt;
  
         &lt;route&gt;
              &lt;to uri="bean:authenticationBean?method=checkAuthentication"/&gt;
              &lt;bean ref="messageTranslator" method="vmmlToEntry"/&gt;
              &lt;to uri="bean:Service?method=store"/&gt;
              &lt;bean ref="messageTranslator" method="returnEntryToStringReplay"/&gt;
         &lt;/route&gt;
     &lt;/post&gt;           
  &lt;/rest&gt;
  </code></pre>