camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Routing based on exchange header content-type
Date Thu, 21 Aug 2014 06:18:07 GMT
Hi

You can use tracer to see the messages details during routing and see
what headers you have
http://camel.apache.org/tracer

Also mind that maybe the content type header is not 100% matching
'application/xml' etc. As sometimes they may have charset or other
values included.

The simple language has a contains function you can use
http://camel.apache.org/simple

On Wed, Aug 20, 2014 at 3:53 PM, harald <sunnyday@rainyday.de> wrote:
> Hello Claus,
>
> yes you are right. But anyway it does not work. Only my last two test scenarios had this
typo and so I retried them.
>
> Is there a restriction that under some circumstances the headers are not available?
>
> Thanks for helping!
> harald
>
> On 20 Aug 2014, at 07:24, Claus Ibsen <claus.ibsen@gmail.com> wrote:
>
>> There is a missing } in your simple expression, you need that to end
>> the left hand side
>>
>>  <simple>${in.headers[‘Content-Type’]} == ‘application/json’</simple>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: cibsen@redhat.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>> hawtio: http://hawt.io/
>> fabric8: http://fabric8.io/
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/

Mime
View raw message