David
David

Reputation: 579

Translate this camel route snippet from Java DSL to Blueprint xml

Does anyone know how to write this camel route snippet in blueprint xml's sytax?

.setHeader("headerName").method(beanInstance, "methodToGetHeaderValue")

I assume it's something like this but I can't get the exact syntax down.

<setHeader headerName="theHeader"> 
    <bean id="beanId" ref="MyBean" method="BeanMethod"/> 
</setHeader>

Thanks!

Upvotes: 1

Views: 720

Answers (1)

Ray
Ray

Reputation: 4869

I think the tag you're looking for to invoke a method is <method>.

The Camel docs have an example of setting a header and invoking a method. Putting these together, you get:

<setHeader headerName="theHeader">
  <method ref="MyBean" method="methodToGetHeaderValue" />
</setHeader>

Upvotes: 1

Related Questions