Return-Path: Delivered-To: apmail-camel-users-archive@www.apache.org Received: (qmail 30674 invoked from network); 26 Feb 2011 15:28:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Feb 2011 15:28:41 -0000 Received: (qmail 37189 invoked by uid 500); 26 Feb 2011 15:28:41 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 36902 invoked by uid 500); 26 Feb 2011 15:28:38 -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 36894 invoked by uid 99); 26 Feb 2011 15:28:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Feb 2011 15:28:37 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [216.32.181.186] (HELO ch1outboundpool.messaging.microsoft.com) (216.32.181.186) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Feb 2011 15:28:32 +0000 Received: from mail70-ch1-R.bigfish.com (216.32.181.170) by CH1EHSOBE003.bigfish.com (10.43.70.53) with Microsoft SMTP Server id 14.1.225.8; Sat, 26 Feb 2011 15:28:10 +0000 Received: from mail70-ch1 (localhost.localdomain [127.0.0.1]) by mail70-ch1-R.bigfish.com (Postfix) with ESMTP id 6C7A716D02CA for ; Sat, 26 Feb 2011 15:28:10 +0000 (UTC) X-SpamScore: -43 X-BigFish: VPS-43(zzbb2cK542N13fcM1432N1453M98dN9371P62a3Lzz1202hzz8275bh8275dhz2dh2a8h668h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: KIP:(null);UIP:(null);IPVD:NLI;H:va3diahub020.RED001.local;RD:smtp801.microsoftonline.com;EFVD:NLI Received: from mail70-ch1 (localhost.localdomain [127.0.0.1]) by mail70-ch1 (MessageSwitch) id 1298734089846121_16108; Sat, 26 Feb 2011 15:28:09 +0000 (UTC) Received: from CH1EHSMHS012.bigfish.com (snatpool1.int.messaging.microsoft.com [10.43.68.241]) by mail70-ch1.bigfish.com (Postfix) with ESMTP id CA71FEF804B for ; Sat, 26 Feb 2011 15:28:09 +0000 (UTC) Received: from va3diahub020.RED001.local (65.55.171.153) by CH1EHSMHS012.bigfish.com (10.43.70.12) with Microsoft SMTP Server (TLS) id 14.1.225.8; Sat, 26 Feb 2011 15:28:09 +0000 Received: from VA3DIAXVS121.RED001.local ([10.32.56.88]) by va3diahub020.RED001.local ([10.32.21.20]) with mapi; Sat, 26 Feb 2011 07:28:10 -0800 From: Scott Came To: "users@camel.apache.org" Date: Sat, 26 Feb 2011 07:28:05 -0800 Subject: RE: File consumer to CXF issues Thread-Topic: File consumer to CXF issues Thread-Index: AcvVh/xq+ME78CmVQLaEeTyLmpNDpwAQURxA Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: search.org The file contains XML...the root element of the xml document in the file is= the child element of soap:body. I tried MESSAGE and it seems the CXF component is expecting the file to con= tain the entire SOAP message (envelope and body), which would be a pain to = create. I'd rather avoid POJO mode since I really don't want to have to ge= nerate code. But nonetheless I tried it and ran into a whole bunch more ex= ceptions...probably wasn't configuring it right. I'd rather learn how to write a converter and do that than have to generate= code. How do I explore whether there is a converter missing? Again, it's surpris= ing that there isn't a converter that will take a GenericFile (or String) a= nd plop it into the soap:body, since that seems like such a common scenario= ...so there must be something I'm missing. Thanks. -----Original Message----- From: Claus Ibsen [mailto:claus.ibsen@gmail.com]=20 Sent: Friday, February 25, 2011 11:35 PM To: users@camel.apache.org Subject: Re: File consumer to CXF issues Hi What does your file contain? Often people use either POJO or MESSAGE format. So there could be a convert= er to/from CxfPayload missing. Especially for String, byte[], streams which= is common types. On Sat, Feb 26, 2011 at 7:53 AM, Scott Came wrote: > After looking at this a bit more (and upgrading to the 4.3.1-fuse-00-00 v= ersion of ServiceMix, which contains Camel 2.6.0), it seems the problem boi= ls down to Camel not knowing how to convert a GenericFile (what results fro= m the part of the route) to a CxfPayload (what is expected by the part of the route). > > Am I on the right track here? > > If so, is there an available converter that does that? =A0It seems like a= fairly common scenario to pick up an XML document that fits the schema for= a particular SOAP operation and send that document in the body of a SOAP m= essage to a web service. =A0So I'm surprised this isn't built in...perhaps = it is, and I'm just not doing something correctly. > > By the way, I tried using convertBodyTo to convert the input file to java= .lang.String and org.w3c.dom.Document, and those efforts resulted in except= ions too. > > Any help appreciated. > > Thanks. > --Scott > > -----Original Message----- > From: Scott Came [mailto:scott.came@search.org] > Sent: Friday, February 25, 2011 1:57 PM > To: users@camel.apache.org > Subject: File consumer to CXF issues > > I have a route that looks like this: > > > =A0 =A0 > =A0 =A0 =A0 > =A0 =A0 =A0 > =A0 =A0 > =A0 > > (As you can tell, I'm deploying this in ServiceMix, but the issue I'm=20 > having is in the Camel realm, thus my posting here...) > > I have defined outEndpoint earlier in the camel-context.xml file using cx= fEndpoint. > > This route is creating exceptions over several different techniques. > > What I really would like is not to generate code using cxf's wsdl2java (f= ollowing this example (http://camel.apache.org/tutorial-osgi-camel-part2.ht= ml) though, I did). =A0I would like to use which, as I understand it, should not require code = generation. =A0However, when I try to do it this way, I get a NullPointerEx= ception in org.apache.camel.component.cxf.CxfEndpoint, at line 577, in the = setParameters() method. > > I don't see anything in the documentation of the Camel CXF component that= states or implies that this isn't supported on the client side. > > So my question is... =A0Is it possible to use the cxf component in the=20 > part of a Camel route, WSDL-first, and not generate code, but=20 > rather have it (under the covers) use the JAX-WS Dispatch approach? =A0 > Is there an example anywhere that does this (I've looked at all the=20 > examples on the Camel website, and several blog postings, and couldn't=20 > find anything that matched my scenario...) > > If it would be better to post this on the CXF or even ServiceMix lists, p= lease advise. > > Thanks. > --Scott > -- Claus Ibsen ----------------- FuseSource Email: cibsen@fusesource.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/