Re: Loop should continue after exception caught.

2016-09-23 Thread Claus Ibsen
What version of Camel do you use? And have you tried upgrading and use latest?

On Fri, Sep 23, 2016 at 10:45 PM, ptatTransamerica  wrote:
> Hi,
>
> I am looking for the option to continue the loop after catching the
> exception in the route.
> e.g
>
> 
>   ${body.size} 
>   
> .calling some service which can produce exception.
>   
> java.lang.Exception
>
>  after catching the exception, I need to continue the loop here.
>  
> 
>
> Any information is appreciated.
>
> Thanks
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Loop-should-continue-after-exception-caught-tp5787979.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: Can't understand what inOnly is doing

2016-09-23 Thread sim085
I am not sure I am following. For example the following page under "Flow of
an exchange through a route" it says "The OUT message from each step is used
as the IN message for the next step. If there is no OUT message then the IN
message is used instead".

Link: http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

Also the javadoc for ProcessDefinition.transform (which I am using) says
"Adds a processor which sets the body on the OUT message"

Link:
https://camel.apache.org/maven/camel-2.15.0/camel-core/apidocs/org/apache/camel/model/ProcessorDefinition.html#transform(org.apache.camel.Expression)

So based on those two I read my flow as follows; the third line
[.transform(constant("AAA")] sets the body of the OUT message to "AAA". This
becomes the IN message for the next line [.inOnly("direct:BBB")]. 

Now, if inOnly means that the exchange does not have an OUT message (as per
what I wrote in first post) then shouldn't the IN message be sent to the
next step (based on the first link above)? i.e. - shouldn't the
[.log("${in.body}")] be equal to "AAA" which is the body of the IN message
passed to [.inOnly("direct:BBB")]?


DariusX wrote
> To clarify, your route flows from the initial consumer (jetty), to a
> remove step, then transform, then a "direct" route consisting of another
> transform, and then a log(). 
> 
> All through this sequence, you have an IN body going from step to step
> (sometimes being transformed, but still IN when it reaches the next step
> in the route). 
> The OUT would be the response that would be returned all the way back to
> whatever software entity made the initial request via to your jetty
> consumer. But, that OUT is not being set at any point. You could have a
> processor that sets the out.body
> 
> Another point to remember is that when you're logging, ${body} is a
> synonym for ${in.body}. You can use ${out.body} to log the body of the OUT
> (but that will be blank in your particular example).





--
View this message in context: 
http://camel.465427.n5.nabble.com/Can-t-understand-what-inOnly-is-doing-tp5787961p5787980.html
Sent from the Camel - Users mailing list archive at Nabble.com.


weaveAddFirst doesn't work correctly with route level onException

2016-09-23 Thread Minh Tran
Hi

I use the advice stuff quite extensively but never weaveAddFirst though. I
do see the kind of exceptions you are seeing from time to time and it's
probably a bug.

I generally find the workaround is to use weaveById. I think it has a lot
less trouble finding the node to weave at if you just give it the precise
id.

On Friday, 23 September 2016, ncsibra  wrote:

> Can somebody confirm that am I doing something wrong or is this really a
> bug?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/weaveAddFirst-doesn-t-work-correctly-with-route-level-on
> Exception-tp5787900p5787949.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Need input on accessing http servlet

2016-09-23 Thread David Parker
As a work-around, you might create a class that invokes a HTTPClient or
other URL-friendly utility.

Invoke that logic in your route to retrieve data and then process it.

On Fri, Sep 23, 2016 at 3:08 AM, jpeschke  wrote:

> Hi,
> You cannot use the Servlet component to connect to a third party servlet on
> your server context.
> The "servlet:" endpoint is only to offer a servlet interface to your camel
> routes. See documentation at http://camel.apache.org/servlet.html:
>
>
> > You can consume only from endpoints generated by the Servlet component.
> > Therefore, it should be used only as input into your Camel routes. To
> > issue HTTP requests against other HTTP endpoints, use the HTTP Component
>
> So the HTTP-Component (http://camel.apache.org/http.html) or the
> Jetty-Component (http://camel.apache.org/jetty.html) should do the trick.
>
> Best regards,
> Joerg
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/Need-input-on-accessing-http-servlet-tp5787954p5787964.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Designing many service routes

2016-09-23 Thread Kasim Sert (Ibtech-Software Infrastructure)
Hi,

I have more than 2 thousands web services(SOAP/REST) and want to move them to 
camel cxf. My question is about designing routes. Should I be designing at 
least one route for each service or I should try to find a way one generic 
route for all services. If both possible what are the pros and cons  of each 
methods?
As far as I know in generic route for all services case I will not be able to 
manage routes like start, stop, easily since all services will be affected. 
What else ?



[Facebook]  [Twitter] 


[https://www.finansbank.com.tr/Disclaimer/BannerImages.aspx?date=24.09.201600:3000]


Bu e-posta'n?n i?erdi?i bilgiler (ekleri dahil olmak ?zere) gizlidir. Onay?m?z 
olmaks?z?n ???nc? ki?ilere a?iklanamaz. Bu mesaj?n g?nderilmek istendi?i ki?i 
de?ilseniz, l?tfen mesaj? sisteminizden derhal siliniz. IBTech A.?. bu mesaj?n 
i?erdi?i bilgilerin do?rulu?u veya eksiksiz oldu?u konusunda bir garanti 
vermemektedir. Bu nedenle bilgilerin ne ?ekilde olursa olsun i?eri?inden, 
iletilmesinden, al?nmas?ndan, saklanmas?ndan sorumlu de?ildir. Bu mesaj?n 
i?eri?i yazar?na ait olup, IBTech A.?.'nin g?r??lerini i?ermeyebilir.

The information contained in this e-mail (including any attachments)is 
confidential. It must not be disclosed to any person without our authority. If 
you are not the intended recipient, please delete it from your system 
immediately. IBTech A.S. makes no warranty as to the accuracy or completeness 
of any information contained in this message and hereby excludes any liability 
of any kind for the information contained therein or for the information 
transmission, reception, storage or use of such in any way whatsoever. Any 
opinions expressed in this message are those of the author and may not 
necessarily reflect the opinions of IBTech A.S.


Loop should continue after exception caught.

2016-09-23 Thread ptatTransamerica
Hi,

I am looking for the option to continue the loop after catching the
exception in the route.
e.g 


  ${body.size} 
  
.calling some service which can produce exception.
  
java.lang.Exception
   
 after catching the exception, I need to continue the loop here.
 


Any information is appreciated.

Thanks



--
View this message in context: 
http://camel.465427.n5.nabble.com/Loop-should-continue-after-exception-caught-tp5787979.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: weaveAddFirst doesn't work correctly with route level onException

2016-09-23 Thread Brad Johnson
I don't using weaving in my tests so can't be of a whole lot of help.
Personally I'd try separating the single weave and double into two separate
test files and see if there's any difference. It isn't too surprising that
it fails with multiples especially with exception handling given the
cautionary note in the camel docs.  That's why I wonder if a simple test
with only one advice and no exception handling in its own test file works
as expected.  If not then that smells like a test framework bug.  But, hey,
what do I know?  Like I said I've always used different mechanisms for
testing and don't really use weaving.  Just thought I'd throw some thoughts
out there since nobody else on the forum seems to have any ideas either.
Wish I could be of more help.

http://camel.apache.org/advicewith.html

On Fri, Sep 23, 2016 at 3:36 AM, ncsibra  wrote:

> Can somebody confirm that am I doing something wrong or is this really a
> bug?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/weaveAddFirst-doesn-t-work-correctly-with-route-level-onException-
> tp5787900p5787949.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Can't understand what inOnly is doing

2016-09-23 Thread DariusX
To clarify, your route flows from the initial consumer (jetty), to a remove
step, then transform, then a "direct" route consisting of another transform,
and then a log(). 

All through this sequence, you have an IN body going from step to step
(sometimes being transformed, but still IN when it reaches the next step in
the route). 
The OUT would be the response that would be returned all the way back to
whatever software entity made the initial request via to your jetty
consumer. But, that OUT is not being set at any point. You could have a
processor that sets the out.body

Another point to remember is that when you're logging, ${body} is a synonym
for ${in.body}. You can use ${out.body} to log the body of the OUT (but that
will be blank in your particular example).




--
View this message in context: 
http://camel.465427.n5.nabble.com/Can-t-understand-what-inOnly-is-doing-tp5787961p5787977.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Applying filtering on an HTTP pattern

2016-09-23 Thread medali_k
I am trying to build routes for restful services using JAX-RX and tomcat as a
server. So I have bunch of from("cxfrs:/...")... routes. However, I need to
apply a common logic that should apply to each HTTP URL under '/secure/' to
apply authentication/authorization logic. I also have a common logging/audit
logic that I need to apply to all my services. Should this logic be included
in all my routes, in which case I will have redendency with all the related
risks. Or is there a better solution to do this? 
I know I have the option of applying Java EE servlet filters, but I need
help to understand whether Camel has something else.
Thank you



--
View this message in context: 
http://camel.465427.n5.nabble.com/Applying-filtering-on-an-HTTP-pattern-tp5787976.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel in Action Book

2016-09-23 Thread Brad Johnson
Hear, hear!  My one hope for the new book is that the emphasis is on using
POJOs for most message processing in lieu of using Processors.  I've found
that once my clients understand how Camel can select a method for
invocation on a bean for a route and how easy that makes unit testing for
constituent pieces a lightbulb goes on and they feel like Plain Ol' Java
Programmers once again.  An almost audible sigh of relief goes up.  And not
using the Processors means I also see less of the tendency to use Camel as
something to read a file or endpoint in and then write a humongous
application with I/O inside a processor and let Camel do the heavy lifting
using the EIPs and components.

I'd save the intricate details of Processors for a more advanced topic in
the later chapters.

Brad

On Fri, Sep 23, 2016 at 8:30 AM, jpeschke  wrote:

> Hello,
> I started learning Camel from scratch about two years ago and read "Camel
> as
> action" at the beginning. I can confirm that "Camel in Action" offers still
> a very good point to start. I knew nothing about Camel or EIPs in general
> and just bought the book to see if Camel could provide some nice features
> for the application I was going to build (and yes, it could indeed :)).
>
> The book has a very clear didactic & straight-forward approach. Most of the
> described topics stayed the same, more or less - if you develop a Camel
> application, you may want to use the Camel website as your main reference,
> because you often need very special endpoints/properties/features that
> aren't documented in the book or where replaced by more flexible ones. But
> to understand the basic idea behind camel, to understand what is good
> practice (and what isn't), the book's  perfect.
>
> Joerg
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/Camel-in-Action-Book-tp5787674p5787965.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Swagger integration shows "no content" (Camel 2.16.3)

2016-09-23 Thread jpeschke
Hello,
Well sometimes, the devil is in the detail.

As I found out, Swagger worked from the beginning. The only problem was that
while serving the Swagger docs under 

"http://://api-docs/" 

in Camel 2.14 (with the old Scala-based Swagger servlet)

it seems that the swagger servlet puts it here:

"http://://api-docs"

(without the trailing slash).
Even if you configure the "api.path" to something like "api-docs/", it still
uses the URL without(!) the trailing slash.

So the whole time, I tested with a wrong url :)


Note:
Unlinke the parameter "api.path", the parameter "base.path" needs a trailing
slash, not like the one I configured above, so it's actually






--
View this message in context: 
http://camel.465427.n5.nabble.com/Swagger-integration-shows-no-content-Camel-2-16-3-tp5787962p5787974.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel-Mail - Consume from IMAP with variable searchTerm.fromSentDate

2016-09-23 Thread Michael Täschner
Hi Camel-Riders,

is there a possibility to consume mails with modifiable
searchTerm.fromSentDate value? I am looking at a solution where the
consumer must not depend on "unseen" flag, manages an internal dateTime
variable to pick-up mail search from where it last stopped?  There may be
other clients on the mail account and I cannot depend on the "unseen" flag.
Is this a case for poll-enrich or how can I manipulate the from query to
use the variable "searchTerm.fromSentDate"?

Thanks and Best Regards,
Michael


Re: Can't understand what inOnly is doing

2016-09-23 Thread DariusX
Conceptually, an "Out" message is a response, back to the caller.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Can-t-understand-what-inOnly-is-doing-tp5787961p5787966.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel in Action Book

2016-09-23 Thread jpeschke
Hello,
I started learning Camel from scratch about two years ago and read "Camel as
action" at the beginning. I can confirm that "Camel in Action" offers still
a very good point to start. I knew nothing about Camel or EIPs in general
and just bought the book to see if Camel could provide some nice features
for the application I was going to build (and yes, it could indeed :)). 

The book has a very clear didactic & straight-forward approach. Most of the
described topics stayed the same, more or less - if you develop a Camel
application, you may want to use the Camel website as your main reference,
because you often need very special endpoints/properties/features that
aren't documented in the book or where replaced by more flexible ones. But
to understand the basic idea behind camel, to understand what is good
practice (and what isn't), the book's  perfect.

Joerg



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-in-Action-Book-tp5787674p5787965.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Can't understand what inOnly is doing

2016-09-23 Thread sim085
I must not be understanding the concept which is why I decided to ask the
question before continue with my reading.

The book I am reading says "When the pattern is InOnly, the exchange
contains an IN message. For InOut, an OUT message also exists". I understood
this as meaning that in an InOnly message exchange pattern (MEP) there is no
OUT message.  

Based on the above I expected the below to log "AAA" in the console. However
I am getting "BBB".

[code]
from("jetty:http://localhost:8282/;)
.removeHeaders("*")
.transform(constant("AAA"))
.inOnly("direct:BBB")
.log("${body}");

from("direct:BBB")
.delay(5000)
.transform(constant("BBB"));
[/code]

If in an InOnly MEP the exchange has no OUT message shouldn't after the call
to "direct:BBB" the IN message have been used as OUT message and therefore
log the body value "AAA"?

What does inOnly mean then in the above code?




--
View this message in context: 
http://camel.465427.n5.nabble.com/Can-t-understand-what-inOnly-is-doing-tp5787961.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Need input on accessing http servlet

2016-09-23 Thread jpeschke
Hi,
You cannot use the Servlet component to connect to a third party servlet on
your server context.
The "servlet:" endpoint is only to offer a servlet interface to your camel
routes. See documentation at http://camel.apache.org/servlet.html:


> You can consume only from endpoints generated by the Servlet component.
> Therefore, it should be used only as input into your Camel routes. To
> issue HTTP requests against other HTTP endpoints, use the HTTP Component

So the HTTP-Component (http://camel.apache.org/http.html) or the
Jetty-Component (http://camel.apache.org/jetty.html) should do the trick.

Best regards,
Joerg



--
View this message in context: 
http://camel.465427.n5.nabble.com/Need-input-on-accessing-http-servlet-tp5787954p5787964.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Swagger integration shows "no content" (Camel 2.16.3)

2016-09-23 Thread jpeschke
Hi,
I just migrated my application to Camel 2.16.3 (previously 2.14.3).

After some adjustments, everyhing works finde except the Swagger
Integration.
Whenever I call the swagger URL, I get HTTP-Response 204 (No Content). I
enabled both the CORS filter in the REST API AND the Swagger-Servlet...but
that doesn't help.
The REST service itself works.

My configuration in web.xml:


And in the REST routes, I did something like this:



What am I missing?

Joerg




--
View this message in context: 
http://camel.465427.n5.nabble.com/Swagger-integration-shows-no-content-Camel-2-16-3-tp5787962.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Need help in processing comma seperated text file

2016-09-23 Thread raghavender.anth...@gmail.com
Am not sure whether I've understood your question correctly, am looking for
an approach/solution that is efficient, quick with minimal code.

Right now, I'm planning to do below steps:

1. Read the source file line by line
2. Process the data line by line and collect the data in several collections
3. Prepare CSVRecord objects for mapping with the destination format
4. Use the collections from step 2 to prepare list of CSVRecord objects
(which uses camel bindy feature)
5. Marshal the collection object to CSV using bindy

Am not sure whether this is an effective solution keeping in mind that the
source file can contain 100,000-10,00,000 records. especially the step 1,
step 2 are gonna take much time if the volume of the data is huge.

Thank you.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Need-help-in-processing-comma-seperated-text-file-tp5787930p5787959.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Need help in processing comma seperated text file

2016-09-23 Thread raghavender.anth...@gmail.com
Thanks Steve. I am sending you the source and target file formats as
mentioned below. The source file can contain 100,000 - 10,00,000 records.

*Source delimited text file:*

[Runtime]
Date=ASAP
Time=
AllowErrors=FALSE

[Task.1]
Server=Item Master
Module=ItemPOSIdentity
Operation=*addupdate*

[Data.1]
ItemPOSIdentity,11108,,40087320,UPC
ItemPOSIdentity,11108,,40087337,UPC
temPOSIdentity,1,,40087325,UPC
ItemPOSIdentity,1,,40087335,UPC

[Task.2]
Server=Item Master
Module=ItemPOSIdentity
Operation=*delete*

[Data.2]
ItemPOSIdentity,11108,,,
ItemPOSIdentity,1,,,

The result file should look like:

--For add update operation
INSERT|ITEM_XREF|11108||40087320|||
INSERT|ITEM_XREF|11108||40087337|||
INSERT|ITEM_XREF|1||40087325|||
INSERT|ITEM_XREF|1||40087335|||

--For delete operation
DELETE|ITEM_XREF|11108|
DELETE|ITEM_XREF|1|

Thank you.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Need-help-in-processing-comma-seperated-text-file-tp5787930p5787957.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: cxf-core 3.1.7 Validation issue with camel

2016-09-23 Thread Willem Jiang
You need to use the [1] instead of the generic camel endpoint 
to setup the schemaLocations for validation.

http://camel.apache.org/cxf.html#CXF-ConfiguretheCXFendpointswithSpring 
--  
Willem Jiang


Blog: http://willemjiang.blogspot.com (English)  
http://jnn.iteye.com (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On September 23, 2016 at 12:16:21 PM, sari.reach (sari.re...@gmail.com) wrote:
> Any update on this Willem?
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/cxf-core-3-1-7-Validation-issue-with-camel-tp5787728p5787946.html
>   
> Sent from the Camel - Users mailing list archive at Nabble.com.
>  



Re: Event notification before endpoint starting retrieving

2016-09-23 Thread Christian Damsgaard
Hi Claus,

Yes - that would properly solve the problem with the delay in notification
about the transfer.

We have for historic reasons the localWorkDirectory set which make the
streamDownload be ignored, but we will try to remove it.

But is there a way to get notified about the endpoint polling (successfully
or not)?

Best regards
Christian



--
View this message in context: 
http://camel.465427.n5.nabble.com/Event-notification-before-endpoint-starting-retrieving-tp5787952p5787955.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Need input on accessing http servlet

2016-09-23 Thread ibrahimis
Hi, I have created servlet which will return a JSON object. I am trying to
connect the servlet using Camel and put it in a buffer. But my servlet
didn't invoked at all and not throwing any error. I am currently in the
beginning stage on using camel. 

Please help.

I have used the following code.

package com.test.camel;

import java.io.IOException;
import java.io.OutputStream;

import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;

public class TestRouteBuilder extends RouteBuilder {

@Override
public void configure() throws Exception {


from("servlet:localhost:9078/ThirdPartyApplication/MaintainCases")
.setHeader("stream", constant(mystream))
.process(new Processor() {
public void process(Exchange exchange) 
throws Exception {
String contentType = 
exchange.getIn().getHeader(

Exchange.CONTENT_TYPE, String.class);
String path = 
exchange.getIn().getHeader(

Exchange.HTTP_URI, String.class);
path = 
path.substring(path.lastIndexOf("/"));


exchange.getOut().setHeader(Exchange.CONTENT_TYPE,
contentType + 
"; charset=UTF-8");

exchange.getOut().setHeader("PATH", path);

exchange.getOut().setBody("*Hello World*");
}
}).to("stream:header");


}

private OutputStream mystream = new MyOutputStream();
private StringBuilder sb = new StringBuilder();

private class MyOutputStream extends OutputStream {

public void write(int b) throws IOException {
sb.append((char) b);
}
}

}



--
View this message in context: 
http://camel.465427.n5.nabble.com/Need-input-on-accessing-http-servlet-tp5787954.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Event notification before endpoint starting retrieving

2016-09-23 Thread Claus Ibsen
You can try using the streamDownload option so the ftp file is not
fully downloaded up-front.

On Fri, Sep 23, 2016 at 11:30 AM, Christian Damsgaard
 wrote:
> Is it possible to receive an event before an endpoint starts receiving the
> body?
>
> The implementation of org.apache.camel.spi.EventNotifier does not provide
> this information.
>
> The use case is that we are receiving 100 mb. file from a slow FTP server -
> it takes about 10 minutes - and we are not able to shut down the camel
> context when this transfer is in progress. We have a custom socket factory
> which we use to monitors the traffic on the sockets created. The plan is
> that when we receive a context shutdown event we will wait for a short while
> and then disconnect any remaining open sockets which will make the FTP
> download fail. But we would for our own dashboard and statistic like to know
> that a transfer has started.
>
> Thanks
> Christian
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Event-notification-before-endpoint-starting-retrieving-tp5787952.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Event notification before endpoint starting retrieving

2016-09-23 Thread Christian Damsgaard
Is it possible to receive an event before an endpoint starts receiving the
body?

The implementation of org.apache.camel.spi.EventNotifier does not provide
this information.

The use case is that we are receiving 100 mb. file from a slow FTP server -
it takes about 10 minutes - and we are not able to shut down the camel
context when this transfer is in progress. We have a custom socket factory
which we use to monitors the traffic on the sockets created. The plan is
that when we receive a context shutdown event we will wait for a short while
and then disconnect any remaining open sockets which will make the FTP
download fail. But we would for our own dashboard and statistic like to know
that a transfer has started.

Thanks
Christian



--
View this message in context: 
http://camel.465427.n5.nabble.com/Event-notification-before-endpoint-starting-retrieving-tp5787952.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Need help in processing comma seperated text file

2016-09-23 Thread Steve973
It might help to show us an example of the data that you are trying to
transform.  If the files are not too large, then simply using the file
component and then invoking a CSV library (such as
http://opencsv.sourceforge.net/) from within a processor should give you
what you want.  Depending on your use case, to arrive at a more optimal and
efficient solution, you might have to show us what your data looks like.

Steve

On Thu, Sep 22, 2016 at 10:30 PM, raghavender.anth...@gmail.com <
raghavender.anth...@gmail.com> wrote:

> Thanks for the response. I would like to use Camel to read the file,
> process it and generate a new CSV file to send it to a different system.
>
> I get this file from a different system X and I need to process and
> transform it to CSV file in a different format which can be understood by
> system Y.
>
> I can try to do that but the problem here is task and data are always
> associated with each other. I'm not sure how to dynamically split based on
> task.1 or task.2 or task.n.
>
> My goal is to read this file and generate a new CSV file in a different
> format.
>
> Can you point me/send me sample code to split the file by task?
>
> I do really appreciate your help.
>
> Thank you.
>
> On Sep 23, 2016 01:25, "DariusX [via Camel]" <
> ml-node+s465427n578794...@n5.nabble.com> wrote:
>
> It isn't clear how you want to use Camel in this picture. if it is simply
> to poll for files, and if the file is not huge, a simple/naive approach
> would be to read in the whole file and do all the steps you need. All as a
> single Processor following the "from:file" consumer.
>
> The the Data/Task sections always follow one another, as in your example,
> you could attempt to split the file into sections that way, and handle each
> split task differently, based on the "operation". It will be more complex
> to code. So the question is: what would you gain by this?
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/Need-help-in-processing-
> comma-seperated-text-file-tp5787930p5787941.html
> To unsubscribe from Need help in processing comma seperated text file,
> click
> here
>  unsubscribe_by_code=5787930=cmFnaGF2ZW5kZXIuYW50aHdhckBnbW
> FpbC5jb218NTc4NzkzMHwxMTkyNDM5ODIz>
> .
> NAML
>  viewer=instant_html%21nabble%3Aemail.naml=nabble.naml.namespaces.
> BasicNamespace-nabble.view.web.template.NabbleNamespace-
> nabble.view.web.template.NodeNamespace=
> notify_subscribers%21nabble%3Aemail.naml-instant_emails%
> 21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.
> com/Need-help-in-processing-comma-seperated-text-file-
> tp5787930p5787945.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Convert Flat File to XML using a XSD Schema

2016-09-23 Thread Daniel P22
Thanks Vitalii and Ranx, is perfect.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Convert-Flat-File-to-XML-using-a-XSD-Schema-tp5787902p5787950.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: weaveAddFirst doesn't work correctly with route level onException

2016-09-23 Thread ncsibra
Can somebody confirm that am I doing something wrong or is this really a bug?



--
View this message in context: 
http://camel.465427.n5.nabble.com/weaveAddFirst-doesn-t-work-correctly-with-route-level-onException-tp5787900p5787949.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel event notifier query

2016-09-23 Thread mayur_bm
Hi,
 I have Osgi container where dynamically we inject camel context.
My requirement is to tap camel exchanges which traverses across various
routes in those camel contexts centrally!!!

Assume if route has some issues with end points then those exchanges will be
propagated with the issue details and I can intercept exchange centrally and
retrieve it!

How do I achieve it? Is camel event notifier serve my purpose?
Regards,
Mayur



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-event-notifier-query-tp5787943.html
Sent from the Camel - Users mailing list archive at Nabble.com.