Re: Way to have Camel process files in timestamp order?

2011-07-15 Thread Donald Whytock
Glad to help. Looks like it would be hard to implement anyway...I can't find a convenient way in Java to get a file's creation date, even though AFAIK Windows and 'nix both have it. On Fri, Jul 15, 2011 at 7:22 PM, johncarlguthrie wrote: > Went with the suggestion of going by filename, and since

Re: how to decide a route should be define?

2011-07-15 Thread xiangqiuzhao
if i need to implement socket protocol, why use netty and not mina? -- View this message in context: http://camel.465427.n5.nabble.com/how-to-decide-a-route-should-be-define-tp4585397p4590876.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Way to have Camel process files in timestamp order?

2011-07-15 Thread johncarlguthrie
Went with the suggestion of going by filename, and since there's already a script to move the files into the directory just had the script put a timestamp on during the move. Thank you for the assistance, kind sir. -- View this message in context: http://camel.465427.n5.nabble.com/Way-to-have-Cam

Re: Way to have Camel process files in timestamp order?

2011-07-15 Thread Donald Whytock
Sorry, not seeing that option. Might be worth a JIRA. Any way you can include the timestamp in the filename and sort on that? On Fri, Jul 15, 2011 at 4:43 PM, johncarlguthrie wrote: > You are quite right! Okay, now I have a slightly different problem. Is there > a flag to look for the time the

Re: Way to have Camel process files in timestamp order?

2011-07-15 Thread johncarlguthrie
You are quite right! Okay, now I have a slightly different problem. Is there a flag to look for the time the file was created instead of when it was last modified? When moving a block of files into the directory, they all have the same modified time. -- View this message in context: http://camel.

Re: RouteBuilder Predicate Syntax

2011-07-15 Thread boday
#1 is correct, you should explicitly call end() after each choice() block... enalposi wrote: > > [Camel 2.7.2] > > Sorry, but I am not quite clear about the syntax of inserting Predicates, > esp to dynamically wire in processors... I am also not sure about the > significance of end() and the ne

Re: Way to have Camel process files in timestamp order?

2011-07-15 Thread Donald Whytock
Should that perhaps be ? On Fri, Jul 15, 2011 at 3:02 PM, johncarlguthrie wrote: > Thinking I should include the line that I am trying to use, maybe I just have > the order wrong or something. The line should pick up a file from > schedBatchInput, and move it to archive when its done. I'm hopi

Re: Way to have Camel process files in timestamp order?

2011-07-15 Thread johncarlguthrie
Thinking I should include the line that I am trying to use, maybe I just have the order wrong or something. The line should pick up a file from schedBatchInput, and move it to archive when its done. I'm hoping this will pick up the OLDEST file first, I'd prefer to select by file create time than la

Re: Way to have Camel process files in timestamp order?

2011-07-15 Thread johncarlguthrie
Well, that was my initial read as well, but using sortBy=reverse:file:modified did not seem to change the order files were picked up. I then ran files through with sortBy=file:modified and things were processed in the same order as before, where I expected something to change. -- View this message

Re: Way to have Camel process files in timestamp order?

2011-07-15 Thread Donald Whytock
No, sortBy appears to act on files rather than file contents. The examples under the file component include sortBy=file:name and sortBy=reverse:file:name. sortBy uses the File Language (http://camel.apache.org/file-language.html), which includes "file:modified" as an option for specifying the fil

FTP temp file not being created correctly on Windows (Camel 2.7.2) ?

2011-07-15 Thread dlj
Hi, I have the following route which sends a file from my local file system via FTP to a folder that does not yet exist on the remote server. ctx.addRoutes( new RouteBuilder() { @Override public void configure() throws Exception { from( "file://target/in?r

Way to have Camel process files in timestamp order?

2011-07-15 Thread johncarlguthrie
Is there a way to determine which file is picked up by a route first when there are several files in a directory? I looked into sortby and Sort, but those seem to be for arranging the content of a single message/file, which is not what I want. I am working on a Spring/Camel application that picks u

Re: How do I authenticate with Camel?

2011-07-15 Thread Richard Kettelerij
Hi, Welcome to the Camel community. Try the following: context.addRoutes(new RouteBuilder() { public void configure() { from("file:data/out?fileName=filename.json&noop=true") .setHeader(Exchange.HTTP_METHOD, constant(org.apache.camel.component.http.HttpMet

RouteBuilder Predicate Syntax

2011-07-15 Thread enalposi
[Camel 2.7.2] Sorry, but I am not quite clear about the syntax of inserting Predicates, esp to dynamically wire in processors... I am also not sure about the significance of end() and the newer endChoice(). Basically, doing 1 choice seems to be working but 2, as in below examples, breaks the conti

Re: jbi:service in camel route problem

2011-07-15 Thread Freeman Fang
Hi, Cxf bc provider can extract operation name from your input payload automatically, as long as your payload is correct per the wsdl, so generally you needn't specify the operation in uri. And about the to jbi uri, take a look at [1] to get more details, per your wsdl and service in cxf bc

Re: Problem with ActiveMQ to Weblogic route

2011-07-15 Thread pwanner
The jira http://issues.apache.org/jira/browse/AMQ-3401 issue has been created. Thank you all for your help. -- View this message in context: http://camel.465427.n5.nabble.com/Problem-with-ActiveMQ-to-Weblogic-route-tp4578300p4590649.html Sent from the Camel - Users mailing list archive at Nab

Re: jbi:service in camel route problem

2011-07-15 Thread Rafal Janik
Hi Freeman, Thanks a lot for your reply. So I have cxfbc provider xmlns:service="http://my.service.com/prototype"; ... And the xmlns:service is the same as in wsdl targetNamespace: targetNamespace="http://my.service.com/prototype"; ...> elementFormDefault="qualified" targetNamespa

Re: jbi:service in camel route problem

2011-07-15 Thread Freeman Fang
On 2011-7-15, at 下午7:25, Rafal Janik wrote: Hi, I'm trying to write a invocation of external ws service in jbi (apache servicemix) using camel. The RouteBuilder.java : from("timer://tutorial?fixedRate=true&delay=4000&period=1") .setBody(constant(msg)) .t

onException vs. doTry...doCatch

2011-07-15 Thread alberto.zigoni
I am trying to properly configure error handler with onException on this route: org.apache.cxf.interceptor.Fault true This route i

jbi:service in camel route problem

2011-07-15 Thread Rafal Janik
Hi, I'm trying to write a invocation of external ws service in jbi (apache servicemix) using camel. The RouteBuilder.java : from("timer://tutorial?fixedRate=true&delay=4000&period=1") .setBody(constant(msg)) .to("jbi:service:http://externalservice.com/An

How do I authenticate with Camel?

2011-07-15 Thread nizhnegorskiy
I need to send a POST request with token. Something like this: curl -H "Authorization: [token]" -X POST --data-binary @filename.json 'http://myhost.com/someurl' I have the following code: context.addRoutes(new RouteBuilder() { public void configure() {

Re: Some indication on when 2.8.0 could be released.

2011-07-15 Thread bvahdat
Hi Don, I've got already that piece of the puzzle since the begin of my project (camel 2.6.0). That's not the problem as I ran the test-cases not under the JBoss but as you would expect standalone on my IDE. There's apparently some issues on the TypeConverter stuff in 2.8.0, see here: http://came

Re: Some indication on when 2.8.0 could be released.

2011-07-15 Thread James Strachan
On 15 July 2011 11:21, Don Doffe wrote: > Babak, > > I had a  problem with camel deployment to JBoss. There was a need for a > special library to enable scanning of the custom packages as camel > components, and a configuation line in appContext.xml (assuming you are > using spring): > >     class

Re: Some indication on when 2.8.0 could be released.

2011-07-15 Thread Don Doffe
Babak, I had a problem with camel deployment to JBoss. There was a need for a special library to enable scanning of the custom packages as camel components, and a configuation line in appContext.xml (assuming you are using spring): Have you fixed that? If not I could send you the library

Re: Some indication on when 2.8.0 could be released.

2011-07-15 Thread bvahdat
Hi Claus, Thanks for your quick reply. In the meanwhile I found what the problem ist and I went across another way which maybe others in the forum could be interested in: The problem was the 'S' in https of the staging repository, in contrast to official maven repos which are pure 'http', so tha

Re: Loading multiple files from the same directory

2011-07-15 Thread Claus Ibsen
On Fri, Jul 15, 2011 at 11:50 AM, divanmostert wrote: > Thanks all - I managed to get it working with this suggestion. I had to > re-use the same Endpoint and ChoiceDefinition and just added > .when(header("CamelFileName").isEqualTo("aFileName.txt").to(...) for each > input. > If you have a conve

Re: Loading multiple files from the same directory

2011-07-15 Thread divanmostert
Thanks all - I managed to get it working with this suggestion. I had to re-use the same Endpoint and ChoiceDefinition and just added .when(header("CamelFileName").isEqualTo("aFileName.txt").to(...) for each input. Marco Westermann wrote: > > from("file:directory") > .choice() > .wh

Re: Some indication on when 2.8.0 could be released.

2011-07-15 Thread Freeman Fang
Hi, Normally I add the stage repo url in my .m2/settings.xml like test true stage-repo https://repository.apache.org/content/repositories/orgapachecamel-023/ false

Re: Some indication on when 2.8.0 could be released.

2011-07-15 Thread Claus Ibsen
What I usually do is to use a profile in my .m2/settings.xml file. And then run using -Pstaging on the mvn command line On Fri, Jul 15, 2011 at 11:15 AM, bvahdat wrote: > Hi, > > I just wanted to give a try for upgrading from 2.7.2 to 2.8.0 and > (temporarily) added the following reposit

Re: Some indication on when 2.8.0 could be released.

2011-07-15 Thread bvahdat
Hi, I just wanted to give a try for upgrading from 2.7.2 to 2.8.0 and (temporarily) added the following repository into my parent pom of a multi-module maven project until it gets populated to the official maven repo next week (http://repo1.maven.org/maven2/ & http://repo2.maven.org/maven2/)

Re: Proper way to process route protobuf/protocolbuffers

2011-07-15 Thread Claus Ibsen
Hi Welcome to the Camel community. Camel has a protobuf data format which you can use in a Camel route. Read this link http://camel.apache.org/protobuf On Fri, Jul 15, 2011 at 9:48 AM, baklarz wrote: > I get protobuf objects from activemq queue. I get messages in byte[] from > activemq. > I ge

Proper way to process route protobuf/protocolbuffers

2011-07-15 Thread baklarz
I get protobuf objects from activemq queue. I get messages in byte[] from activemq. I generate class from *.proto files ? @Consume(uri="activemq:PostEvent.QUEUE) public void(byte [] message) { PostEventProto.PostEvent postEvent = PostEventProto.PostEvent.parseFrom(message); /*some stupid

Re: Using cxf:bean to invoke external webservice

2011-07-15 Thread kmoens
In meantime I progressed a bit. Because my WSDL contains a single service/port, I can leave out the following in the cxfEndpoint configuration: serviceName="s:AmlService" endpointName="s:AmlServicePort" xmlns:s="http://aml.mycomp.com"; so it ends up like http://localhost:8080/aml/AmlService"

Re: How to impl bean-side of proxy w/Future return?

2011-07-15 Thread Jason Dillon
> See this unit test, where you dont have to implement any interface at all > http://svn.apache.org/viewvc?rev=1146964&view=rev This testcase doesn't actually route the proxy's request to a bean:* endpoint. The entire point of this thread was about how one would implement a Future Foo.sayHello(