camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Error not raised by Camel if the @Header type define in a bean is not correct
Date Tue, 16 Jun 2009 10:09:27 GMT
On Tue, Jun 16, 2009 at 11:50 AM, Charles Moulliard<cmoulliard@gmail.com> wrote:
> Hi,
>
> Is it an issue or not ?
>
> If I define the parameters of my bean method like this :
>
>    public RequestMessage saveRequestMessage(
>        @Body RequestMessage requestMessage,
>        @Header(value = "messageType") String messageType,
>        @Header(value = "requestId") String requestId,
>        @Header(value = "validationResult") List<Audit> errors)
>
> Camel does not raise an error if the content of the header validationResult
> does not correspond to the type List<Audit> ?

Camel will do a type convertions using the camel type converter.
And I guess it uses a silent type converter so in case it cannot
convert it it get a null value.

Can you create a small unit test that demonstrates this issue? To be
used so I can look into letting Camel
fail with an type conversion error.


>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *****************************
> blog : http://cmoulliard.blogspot.com
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Mime
View raw message