Camel Enrich and AggregationStrategy
<p>I'm trying to use Camel's enrich EIP with Custom AggregationStrategy  i.e</p>

<pre><code>from("direct:xyz")
   .setHeader("...","")
   .enrich("http://localhost:myservice", new AggregationStrategy() {

       public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
         .....
       }
});
</code></pre>

<p>Output from HTTP endpoint returns XML response. I would like that to be marshalled and set to the body of the <code>newExchange</code>. </p>

<p>Currently I'm doing this by injecting <code>JaxbDataFormat</code> to the <code>AggregationStrategy</code> and calling unmarshall method .. i.e  </p>

<pre><code>public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
     AnotherObj obj = dataFormat.unmarshall(newExchange,
          newExchange.getIn().getBody(InputStream.class));

     Parentobj test = oldExchange.getIn().getBody(ParentObj.class)

     test.setobj(obj)
     oldExchange.getIn().setBody(test);
     return oldExchange;
   }
</code></pre>

<p>Is there any better way to accomplish this?</p>