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 A55577572 for ; Tue, 23 Aug 2011 09:52:11 +0000 (UTC) Received: (qmail 57135 invoked by uid 500); 23 Aug 2011 09:44:43 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 56900 invoked by uid 500); 23 Aug 2011 09:44:10 -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 56389 invoked by uid 99); 23 Aug 2011 09:44:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Aug 2011 09:44:04 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Aug 2011 09:43:57 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1QvnWB-0006dK-ST for users@camel.apache.org; Tue, 23 Aug 2011 02:43:35 -0700 Date: Tue, 23 Aug 2011 02:43:35 -0700 (PDT) From: heinrichheine To: users@camel.apache.org Message-ID: <1314092615874-4726154.post@n5.nabble.com> Subject: setHeader using xpath returns Object? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, i'm building my first route using the java DSL and i'm running in a small trouble setting a header field. I had a spring route looking and working like this: //incoming:Value[1]/@date I want to build exactly the same in the java dsl: .setHeader("incomingDate") .xpath("//incoming:Value[1]/@date", String.class, ns) The problem is, that xpath returns an Object, so i cannot continue configuring my route from this point. I want to put a choice as next step in the route, but thats not working because xpath returns an Object. And also i get a compiler warning due to type safety. Does anyone have an idea for this? Thanks in advance martin -- View this message in context: http://camel.465427.n5.nabble.com/setHeader-using-xpath-returns-Object-tp4726154p4726154.html Sent from the Camel - Users mailing list archive at Nabble.com.