Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 40533 invoked from network); 22 Oct 2008 11:39:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Oct 2008 11:39:37 -0000 Received: (qmail 12210 invoked by uid 500); 22 Oct 2008 11:39:40 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 12191 invoked by uid 500); 22 Oct 2008 11:39:40 -0000 Mailing-List: contact camel-user-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-user@activemq.apache.org Delivered-To: mailing list camel-user@activemq.apache.org Received: (qmail 12180 invoked by uid 99); 22 Oct 2008 11:39:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Oct 2008 04:39:40 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Oct 2008 11:38:27 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1Ksc3N-0005D1-8Q for camel-user@activemq.apache.org; Wed, 22 Oct 2008 04:39:05 -0700 Message-ID: <20108946.post@talk.nabble.com> Date: Wed, 22 Oct 2008 04:39:05 -0700 (PDT) From: cmoulliard To: camel-user@activemq.apache.org Subject: Re: Xstream marshalling & Alias In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: cmoulliard@gmail.com References: <20089956.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org 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 : >> 2008/10/21 cmoulliard : >>> >>> 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 : cmoulliard@xpectis.com 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.