title: Camel get string from file
body: <p>I'm trying to get string from xml file and set its value to an object, but can't figure out how to do this. Here's what I've done so far:</p>
  
  <pre><code>public class Converter {
  
  public static void main(String[] args) throws Exception {
  
      final XmlJsonDataFormat xmlJsonFormat = new XmlJsonDataFormat();
      xmlJsonFormat.setTypeHints(String.valueOf("YES"));
  
      CamelContext context = new DefaultCamelContext();
      context.getTypeConverterRegistry().addTypeConverter(User.class, String.class, new UserConverter());        
  
      context.addRoutes(new RouteBuilder() {
          public void configure() {
              from("ftp://Mike@localhost")
                      .to("seda:input").marshal(xmlJsonFormat).to("seda:out");
          }
      });
  
      User user = context.getTypeConverter().convertTo(User.class, "seda:out"); // Here i need to access string from "seda:out"
  
      context.start();
      Thread.sleep(5000);
      System.out.println(user.getLogin());
  
  }
  
  private static class UserConverter extends TypeConverterSupport {
  
      @SuppressWarnings("unchecked")
      public &lt;T&gt; T convertTo(Class&lt;T&gt; type, Exchange exchange, Object value) {
          User user = new User();
          user.setLogin(String.valueOf(value.toString()));
          return (T) user;
      }
  }
  }
  </code></pre>
  
  <p>My output is <strong>seda:out</strong>, but i need the output to be the string, that is in <code>seda:out</code>.<br>
  How can this be done?</p>