Many thanks.

In this case, it will be required that I create my own format
(XSTreamDataFormat) like this o use annotation :

                XStream xstream = new XStream();
                xstream.processAnnotations(StockPrice.class);
                XStreamDataFormat myformat = new XStreamDataFormat();
                myformat.setXStream(xstream);
                
                from("direct:in").marshal(myformat).to("mock:result");

Remark : 

It should be interesting to use the xstream dataformat with a parameter
indicating that XStream must process annotation
from("").marshal().xstream().processAnnotation().to("") to avoid to create
its own DataFormat ?

KR,

Charles


James.Strachan wrote:
> 
> Or use XStream annotations on your types...
> http://xstream.codehaus.org/annotations-tutorial.html
> 
> 2008/10/21 James Strachan <[EMAIL PROTECTED]>:
>> 2008/10/21 cmoulliard <[EMAIL PROTECTED]>:
>>>
>>> Hi,
>>>
>>> Is it possible during the Xstream marshalling to define alias attribute
>>> as
>>> this is possible in the Xstream package
>>> (http://xstream.codehaus.org/alias-tutorial.html) ?
>>>
>>> If the answer is yes, where can I find an example ?
>>
>> There's no example, but you can just instantiate the XStreamDataFormat
>> class and configure its XStream object to be whatever you like.
>>
>> XStreamDataFormat myformat = new XStreamDataFormat();
>> myformat.setXStream(whatever);
>>
>>
>> from("...").marshal(myformat);
>>
>>
>>
>> --
>> James
>> -------
>> http://macstrac.blogspot.com/
>>
>> Open Source Integration
>> http://fusesource.com/
>>
> 
> 
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://fusesource.com/
> 
> 


-----
Enterprise Architect

Xpectis
12, route d'Esch
L-1470 Luxembourg

Phone +352 25 10 70 470
Mobile +352 621 45 36 22

e-mail : [EMAIL PROTECTED]
web site :  www.xpectis.com www.xpectis.com 
My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: 
http://www.nabble.com/Xstream-marshalling---Alias-tp20089956s22882p20108946.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to