If you're using XPath, couldn't you convert to Source or Result? Both from javax.xml.transform.
On 28 July 2014 04:18, vdhawan <vaibhav.10.dha...@gmail.com> wrote: > I have a wsdl with multiple operations and the typical structure of the > message looks like > > <Envelope> > <Header> > <MyHeader> > .... > ..... > </MyHeader> > <Header> > <Body> > <MyBody> > ......... > .......... > </MyBody> > <Body> > <Envelope> > > Can i unmarshal camel context and send MyHeader and MyBody objects to the > processor in properties or headers? > I do not want to write my custom type converters since there are multiple > "types" of MyBody (because there are multiple operations) > > Currently, i have managed to make it work as following > public void myMethod(Exchange exchange,@XPath(//MyHeader) DOMNodeList > header, @Xpath(//MyBody mybody) > -- Do unmarshalling > -- Edit the message > -- Marshal > -- Set Body in outgoing exhange > > Is this the right way to do it? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/How-to-pass-multiple-custom-objects-to-processor-tp5754502.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Matt Sicker <boa...@gmail.com>