Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 46890 invoked from network); 22 Oct 2008 11:52:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Oct 2008 11:52:27 -0000 Received: (qmail 24693 invoked by uid 500); 22 Oct 2008 11:52:30 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 24669 invoked by uid 500); 22 Oct 2008 11:52:30 -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 24658 invoked by uid 99); 22 Oct 2008 11:52:30 -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:52:30 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of james.strachan@gmail.com designates 209.85.217.15 as permitted sender) Received: from [209.85.217.15] (HELO mail-gx0-f15.google.com) (209.85.217.15) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Oct 2008 11:51:17 +0000 Received: by gxk8 with SMTP id 8so6760271gxk.14 for ; Wed, 22 Oct 2008 04:51:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Ov5CP6REkZsWR91pyFEhBYfiBc0JVjylJSR/4jXIdNI=; b=TThcxeqYsvUsZKe28QgpWDrnbWOQYQN3aeHTqEEUXR0hKTzf2m2HWDjANR0X6TtkXK WKRor++IF3ef3DhAaUyLg10L0RFU6NOi9E9oZUFe8DhvbCmzQGbymULC7MjLxviLrJrn Hk7ev79GELgScrNmXzDp/WmvgJJ3pSQiQAYR0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=HcoxZSOgSwuI+9SPg6yLs/gnhQWchtiwm0alK5z4ZZysEon4nFIpcplZUpSRXbyLG2 PJyaynJtjAWs/JuAss7+WQaJkGh+1mLmemoVH39GMEjk0t+GiryRtsJdDL67YIPG6w3K ErGBxQoI13UizJT0swb5SQ8Z+cEBkwT8uGM04= Received: by 10.90.103.13 with SMTP id a13mr10215746agc.69.1224676315564; Wed, 22 Oct 2008 04:51:55 -0700 (PDT) Received: by 10.90.117.12 with HTTP; Wed, 22 Oct 2008 04:51:55 -0700 (PDT) Message-ID: Date: Wed, 22 Oct 2008 12:51:55 +0100 From: "James Strachan" To: camel-user@activemq.apache.org Subject: Re: Xstream marshalling & Alias In-Reply-To: <20108946.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20089956.post@talk.nabble.com> <20108946.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org 2008/10/22 cmoulliard : > > 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"); Do you have to tell XStream which classes to look for annotations? I'd have thought, like JAXB, it'd just look for the annotations by default on whatever classes it was marshalling. But I guess for unmarshalling it needs to know (rather like the JAXBContext needs to know the classes/packages) > 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 ? I think like JAXB, we'd just need to create the XStreamDataFormat explicitly using whatever configuration is required -- James ------- http://macstrac.blogspot.com/ Open Source Integration http://fusesource.com/