camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmoulliard <cmoulli...@gmail.com>
Subject Re: Is there a WIKI page describing class type returned by getBody() method ?
Date Tue, 15 Apr 2008 07:54:11 GMT

Great idea. We should raise a JIRA to track this; it would be handy
information to know.

>> Are you going to open a JIRA task ?

We should make it easy to diagnose what the body type is; maybe we
should hack the log endpoint to make it easy to log the body content
and type?
http://activemq.apache.org/camel/log.html

>> According to this approach, the user is required to modify its CamelRoute
>> by adding :
.to("log:loggingCategory?level=DEBUG")
I thinkh that this appraoch is a little bit invasive. 
It should be better to have a static Trace method defined at the level of
the CamelContext that we can activate or desactivate in the configure()
method in order to produce INFO, ERROR or DEBUG information and of course
generate the required information like the Body class type returned, headers
info, ... ?

Regards,

Charles

Question : Which values can take loggingCategory. The wiki page is not
sufficiently clear concerning this.

James.Strachan wrote:
> 
> On 14/04/2008, cmoulliard <cmoulliard@gmail.com> wrote:
>>
>>  Hi,
>>
>>  I would like to know if there a WIKI page describing the class type
>> returned
>>  by getBody() method of the class Exchange according to the component
>> used ?
>>
>>  In the javadoc of Camel, it is mentioned that the method getBody()
>> returns
>>  an object. This object corresponds to a class of type java.io.File in
>> the
>>  case we use the File component
>> (from("file:///c:/temp/test?delete=true"))
> 
> Great idea. We should raise a JIRA to track this; it would be handy
> information to know.
> 
> We should make it easy to diagnose what the body type is; maybe we
> should hack the log endpoint to make it easy to log the body content
> and type?
> http://activemq.apache.org/camel/log.html
> 
>>  It should be nice to have a table representing such information
>> component by
>>  component and WHICH class we can use to convert the body
>>
>>  ex :
>>  - convertBodyTo(String.class) when parsing a file using from("file:///)
>>  - convertBodyTo(DOMSource.class) when extracting message coming from a
>> JBI
>>  endpoint
> 
> BTW you only need to convert the body if you wanna process it in some
> way. e.g. you can just get the body, when using the File component as
> a File if you want. Or as a Source if you are using JBI. You only need
> to convert to another type if its not the thing you want. e.g. you
> could convert a JBI message body to a String if you fancied it etc.
> 
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://open.iona.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Is-there-a-WIKI-page-describing-class-type-returned-by-getBody%28%29-method---tp16677652s22882p16697032.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message