Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E59BDDDBD for ; Tue, 12 Feb 2013 07:16:12 +0000 (UTC) Received: (qmail 51847 invoked by uid 500); 12 Feb 2013 07:16:12 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 51799 invoked by uid 500); 12 Feb 2013 07:16:12 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 51788 invoked by uid 99); 12 Feb 2013 07:16:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2013 07:16:11 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.223.169 as permitted sender) Received: from [209.85.223.169] (HELO mail-ie0-f169.google.com) (209.85.223.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Feb 2013 07:16:06 +0000 Received: by mail-ie0-f169.google.com with SMTP id 13so8970572iea.0 for ; Mon, 11 Feb 2013 23:15:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=JQFvX8PV2JeicN9j9FJF4fbiactC9hs2h5+CsIvhEoE=; b=NlVezrJEs1g6n35VhT2BNtpUGZAJ6hx4604NEgJ1MZ/+j+ghuJgS6SxRpUcvfptp2k vciGYCz/9NVTgE+a/vxl6m6HtHS53XLBcls38McL2uvSRjH3EJVJu72wrCp2gdpotT3i OOQiiq7lA4JW3/gM5Noi19I8TTCjo3XzWygNNRsu+vdWIj3LDNT5+PxT3YYaVQKEDXhA aukrXV2ustcE4oCADpL6sp24agVrOVpGCq2gUPRNOMegpe+JTSwxx/S0wR/icdqGwjqJ 1HZeOO+oFv1y6yqEPjRZlMvy6kzlaoxUoWn5oJjZJXpVcVZiOM8wY99XgdzCtszfXtAM DRSg== X-Received: by 10.50.6.230 with SMTP id e6mr1412635iga.3.1360653345092; Mon, 11 Feb 2013 23:15:45 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.53.232 with HTTP; Mon, 11 Feb 2013 23:15:24 -0800 (PST) In-Reply-To: References: From: Claus Ibsen Date: Tue, 12 Feb 2013 08:15:24 +0100 Message-ID: Subject: Re: Camel Scala JAXB DSL To: users@camel.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On Mon, Feb 11, 2013 at 7:20 PM, Joe San wrote: > Does the Scala DSL support JAXB marshal and unmarshal? I have the following > scenario where I have xjc generated Java files. I give these files to my > JaxbDataFormat and assign it to a val in Scala as below: > > val jaxb = new JaxbDataFormat("com.test.model.generated.Shiporder") > > I now reference this in my route as below: > > from("file:/Users/joe/Desktop/in?noop=true").unmarshal(jaxb)...... > > But the Scala compiler seems not to be happy and spits out strange error: > > scala: type mismatch; > found : java.lang.String("com.test.model.generated.Shiporder") > required: Boolean > val jaxb = new JaxbDataFormat("com.test.model.generated.Shiporder") > > Help appreciated. > Yes Scala DSL supports marshal / unmarshal. However it does not have the data formats defined in the DSL out of the box, as in Java or XML DSLs. We have a ticket about this. You need to create them as you do. Just mind there is 2 classes named JaxbDataFormat, and you need to use the correct one in the DSL. > Regards, > Joe > ^ -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cibsen@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen