Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 85168 invoked from network); 1 Jul 2008 11:00:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Jul 2008 11:00:09 -0000 Received: (qmail 74387 invoked by uid 500); 1 Jul 2008 11:00:10 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 74362 invoked by uid 500); 1 Jul 2008 11:00:10 -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 74351 invoked by uid 99); 1 Jul 2008 11:00:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jul 2008 04:00:10 -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; Tue, 01 Jul 2008 10:59:18 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1KDdaD-0005cy-SI for camel-user@activemq.apache.org; Tue, 01 Jul 2008 03:59:37 -0700 Message-ID: <18213811.post@talk.nabble.com> Date: Tue, 1 Jul 2008 03:59:37 -0700 (PDT) From: skg To: camel-user@activemq.apache.org Subject: Re: putting a message in some text file using jms and camel from an end point In-Reply-To: <18190573.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: saurabh_garg05@infosys.com References: <18190573.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi, i did the same thing, the service is deployed but the output file is not created . Can u suggest me the reason for that and send me how to write in a file component. I am able to read from a file component. skg wrote: > > Hi, > I am working on the example to pass a message using jms through camel > tooling.I am getting the message on service mix console but i want the > message in some file.While doing that i am getting the error. > ERROR - DeadLetterChannel - On delivery attempt: 2 caught: > org.apac > he.camel.InvalidPayloadException: No in body available of type: > java.io.InputStr > eam but has value: javax.xml.transform.sax.SAXSource@11a70a7 of type: > javax.xml. > transform.sax.SAXSource on the exchange: Exchange[FileMessage: > C:\MavenCheckSend > er\reports.txt] > org.apache.camel.InvalidPayloadException: No in body available of type: > java.io. > InputStream but has value: javax.xml.transform.sax.SAXSource@11a70a7 of > type: ja > vax.xml.transform.sax.SAXSource on the exchange: Exchange[FileMessage: > C:\MavenC > heckSender\reports.txt] > at > org.apache.camel.util.ExchangeHelper.getMandatoryInBody(ExchangeHelpe > r.java:117) > at > org.apache.camel.component.file.FileProducer.process(FileProducer.jav > a:71) > at > org.apache.camel.component.file.FileProducer.process(FileProducer.jav > a:60) > at > org.apache.camel.impl.converter.AsyncProcessorTypeConverter$Processor > ToAsynProcessorBridge.process(AsyncProcessorTypeConverter.java:44) > at > org.apache.camel.processor.SendProcessor.process(SendProcessor.java:7 > 3) > at > org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChanne > l.java:136) > > > i am putting my code also to figure out if i have done anything wrong. > > > from("timer://tutorial?fixedRate=true&period=10000").setBody(constant("Hello > saurabh!")).to("jbi:endpoint:urn:org:apache:servicemix:tutorial:camel:jms:provider"); > // 3 > > //...and receive messages sent by other JBI endpoints > > from("jbi:endpoint:urn:org:apache:servicemix:tutorial:camel:jms:consumer").process(new > Processor(){public void process(Exchange exchange) { Message in = > exchange.getIn();StreamSource source = in.getBody(StreamSource.class);if > (source != null) > {in.setBody(source.getInputStream());}}}).to("file:C:/MavenCheckSender/reports.txt"); > -- View this message in context: http://www.nabble.com/putting-a-message-in-some-text-file-using-jms-and-camel-from-an-end-point-tp18190573s22882p18213811.html Sent from the Camel - Users mailing list archive at Nabble.com.