-
1. Re: Camel route depending on header. Namespace breaks condition
jorgemoralespou_2 Nov 17, 2014 11:20 AM (in response to mfernandezmartinez)In the java dsl you can register a namespace in the camel registry and use it when acceding the header.
-
2. Re: Camel route depending on header. Namespace breaks condition
mfernandezmartinez Nov 17, 2014 12:56 PM (in response to jorgemoralespou_2)Thank you Jorge.
I tried changing the configure method adding the namespace, but the results are the same. What am I doing wrong?
Namespaces ns = new Namespaces("c", "http://mycompany/smth");
from("switchyard://CamelInterfaceService")
.log("Header: ${headers}")
.log("The HEADER.DF is ${header.DF}")
.log("Received message for 'CamelInterfaceService' : ${body}")
.choice()
.when().xpath("in:header('/c:DF') = 'myElement'", ns)
.to("switchyard://OtherService")
.log("SENT")
.end();
Thanks!
-
3. Re: Camel route depending on header. Namespace breaks condition
mfernandezmartinez Nov 28, 2014 11:55 AM (in response to mfernandezmartinez)I posted this same question in StackOverflow and a user called "Willem Jiang" suggests that this may be a bug of Switchyard. Can somebody confirm it?
"It looks like a bug of switchyard, you may need to ask help from switchyard. – Willem Jiang Nov 20 at 4:31"
Thank you!
-
4. Re: Camel route depending on header. Namespace breaks condition
jorgemoralespou_2 Nov 28, 2014 6:30 PM (in response to mfernandezmartinez)Hi Miguel,
Sorry I'm out of office.
Have you validated that the header is being properly progressed through the context mapper?
First thing is to ensure that the header gets to the camel component. Enable message tracing and validate it.
Remember soap headers must be defined with the namespace in the context mapper.
Once this is validated we can probably be able to track down the problem if there is any. Create a reproducer app and we'll try to validate the usecase or tell you where the problem is.
I'll monitor this thread.