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 D94EB11987 for ; Fri, 20 Jun 2014 15:47:42 +0000 (UTC) Received: (qmail 5391 invoked by uid 500); 20 Jun 2014 15:47:42 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 5257 invoked by uid 500); 20 Jun 2014 15:47:42 -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 5245 invoked by uid 99); 20 Jun 2014 15:47:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jun 2014 15:47:41 +0000 X-ASF-Spam-Status: No, hits=0.6 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.213.178 as permitted sender) Received: from [209.85.213.178] (HELO mail-ig0-f178.google.com) (209.85.213.178) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Jun 2014 15:47:39 +0000 Received: by mail-ig0-f178.google.com with SMTP id hn18so657965igb.17 for ; Fri, 20 Jun 2014 08:47:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=J8ybiRTVDLiWHLiy0/1mig4lNBzS1IxKDVICj+cpV8M=; b=CwzFoZJar7U5A3mVSzeTPM8aYJRczsuXgmV2n2Es731kgSEuG1beonGAMNUtPTiUFl rLGAPbSELCzhLfLuRMsEcCh43ifYNT1VpNOE7Wfv5/FHuZWxF11aAGZGvZ+yzcwTRnww 7WVwjg/c3qAo+a8IzvpKKVzKidhCD2xVgrLj47PkdneAXdrZgNcY4dCw/Ydddo9ZBU32 Axx8U/xInWkCmUoIOKy/wzyHGVMbXx7Z4VuPHp/ogUjwZ9cImkvFuNGQ45T9EJJl4FvC 7DxSGmibYOxfa3iRwFy8Sthq2Iag5lCH8i4NuR8ZLQQ4DlUEUFWGVGVtCnpEnC4FbdNW vSiQ== X-Received: by 10.42.204.197 with SMTP id fn5mr3596971icb.95.1403279235406; Fri, 20 Jun 2014 08:47:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.11.98 with HTTP; Fri, 20 Jun 2014 08:46:55 -0700 (PDT) In-Reply-To: References: <1403003691785-5752422.post@n5.nabble.com> From: Claus Ibsen Date: Fri, 20 Jun 2014 17:46:55 +0200 Message-ID: Subject: Re: How to consume HL7 with file/ftp component and skip startByte To: "users@camel.apache.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Fri, Jun 20, 2014 at 5:02 PM, dagaz wrote: > HI, > > unfortunately this does not work. Parser throws an exception, that there = is > a failure with data format, because first symbol in the file is not MSH..= . > but the MSH... > Then write 5-10 lines of java code that removes the start/end bytes, and then use the hl7 data format. Though we could also maybe add a new option to hl7 data format, so you can configure it to do that for you like the codec does. > I see the solution should be to use HL7 codec in this place, but I do not > find how to configure it for simple ftp/file components. > > > -- > Pagarbiai, > Vytautas Dagilis > +37067715044 > > > On Tue, Jun 17, 2014 at 2:14 PM, dagaz [via Camel] < > ml-node+s465427n5752422h66@n5.nabble.com> wrote: > >> We have to consume HL7v2 files from filesystem or ftp server. Most of >> those files have startByte as in MLLP specification. >> >> How it would be possible to consume files and automatically skip the >> leading/tailing bytes from the protocol? Otherwise parser is unable to >> parse the the file. >> >> I saw a HL7codec, but as far as I understand it is possible to use it on= ly >> witn MINA/MLLP protocol. Is there any codecs for File or FTP components? >> How should I fix this issue? >> >> ------------------------------ >> If you reply to this email, your message will be added to the discussio= n >> below: >> >> http://camel.465427.n5.nabble.com/How-to-consume-HL7-with-file-ftp-compo= nent-and-skip-startByte-tp5752422.html >> To start a new topic under Camel - Users, email >> ml-node+s465427n465428h52@n5.nabble.com >> To unsubscribe from Camel - Users, click here >> >> . >> NAML >> >> > > > > > -- > View this message in context: http://camel.465427.n5.nabble.com/How-to-co= nsume-HL7-with-file-ftp-component-and-skip-startByte-tp5752422p5752638.html > Sent from the Camel - Users mailing list archive at Nabble.com. --=20 Claus Ibsen ----------------- Red Hat, Inc. Email: cibsen@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/