0

I am calling a NMR endpoint which sets some headers for me. It is an InOut Pattern where while the response comes back one of the header set does not exists.

In Log statement I give &{headers} to print all the headers with their names. But one header which is set in the NMR endpoint(in a java class) does not exists.

Please help me out here to understand what is happening. At least help me to understand on what cases I will lose a header .

If I am trying to print a header which is not existing at all in a logger will I get null or nothing?

Service mix is 4.5.x and the camel is 2.6

рüффп
  • 5,172
  • 34
  • 67
  • 113
Naveen Raj
  • 801
  • 11
  • 26
  • I have a question though based on the mentioned scenario. If some values are set to out header in a java class and the same value is is read from the out header throught out().getHeader() in a printf() statement will the header be lost .. Might be a bug in earlier cases and thats why I asked this question . I am sorry if My question was too much out of the way . – Naveen Raj Mar 24 '14 at 13:14
  • I used getOut() to set the headers and before that I set the headers and body from getIn() ot getOut(). Now I have changed to getIn() for setting new header and the already existing headers from getIn() will be preserved by camel. With this it is working . Any Idea that the previous is not working ? – Naveen Raj Mar 25 '14 at 09:21

1 Answers1

0

Just like communicating with other routes when we call other routes/bundle. If the headers sent while calling them are removed(either due to setbody() or getOut().setBody() methods) the response will not have the header sent earlier.

Naveen Raj
  • 801
  • 11
  • 26