Re: ftp-consumer: recovering a previous established connection

2012-11-26 Thread Hildegard Schedthelm
Hello All! Has someone any ideas how to trigger a reconnect? A new poll probably not occur. Hilde Von: Hilde An: users@camel.apache.org Gesendet: 12:55 Montag, 26.November 2012 Betreff: Re: ftp-consumer: recovering a previous established connection When d

Re: Camel for Rest Service

2012-11-26 Thread Willem jiang
What's invocation looks like, you should get a Response object from the message body. If you are using camel-cxfrs you will not see the under layer response (XML or JSON). -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Bl

Re: Intercepting message for testing not working

2012-11-26 Thread Claus Ibsen
Hi See the green box on this page http://camel.apache.org/advicewith.html On Mon, Nov 26, 2012 at 8:34 PM, lleclerc wrote: > Hi, > > I am trying to do testing on a route, but I can't see what I am doing wrong. > > I have this method from MyClass : > > public RouteBuilder createRoute(...) { > ..

Re: If header (a string) exists and length is > 5, then.... via Spring DSL?

2012-11-26 Thread Claus Ibsen
On Mon, Nov 26, 2012 at 6:56 PM, dunnlow wrote: > With camel 2.10 and Spring 3.1 I am trying to test to see if a string in a > header exists OR is too short. The test for null works as expected, but I > seem to be unable to check the length. Any thoughts as to why? > > > > >

Re: Set body to length of header string in Spring DSL?

2012-11-26 Thread Claus Ibsen
On Tue, Nov 27, 2012 at 4:14 AM, Willem jiang wrote: > Hi, > > Does the header "name" value is String? > If it is not , you'd better to convert it to a String. > Yeah it has to be a String so there is a length method. You can invoke the toString method first. ${header("name").toString().length()

Re: Camel for Rest Service

2012-11-26 Thread Bala
Hi Willem  Thanks for the response. Am able to get the response, after I changed the code. In the body "exchange.getIn().getBody()", I don't get anything. Can you please let me know on how do I get a JSON response ? Am not able to get a good material for this in internet too. Thanks in advance

Re: CXF proxy for ws security

2012-11-26 Thread Claus Ibsen
Hi Could Dan's and Willems' comments be added as a FAQ, and a reference to it from the Camel CXF doc page? This is good details in there that end users of Camel and CXF likely would like to find more easier than what you can do today. On Tue, Nov 27, 2012 at 3:52 AM, Willem jiang wrote: > Just

Re: [camel-mina2] Bug in default UDP codec (Mina2UdpProtocolCodecFactory)?

2012-11-26 Thread Mikael Fernandus Simalango
On Sat, Nov 24, 2012 at 5:29 PM, Claus Ibsen wrote: > > So have you tried with setting auto expand = false in camel-mina2, and > see if that fixes the issue for you? > > Hi Claus, Thanks for your comment. I have conducted more tests to trace the root cause. Unfortunately, setting auto expand to

Re: Camel for Rest Service

2012-11-26 Thread Willem jiang
If you are using the processor to handle the response message you need to take the in message instead of take the out message. As Camel Pipeline will copy the out message of previous exchange to the next exchange in message. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web:

Re: camelcontext

2012-11-26 Thread Willem jiang
When you using the Main, we will create an application context which could hold two instance of camel context and they are started by default. If you are using SpringCamelContext, you just hold one reference of the camel context. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Ha

Camel for Rest Service

2012-11-26 Thread Bala
Hi, I am new to Apache camel and trying to Configure camel for invoking a rest webservice and getting a response in JSON and type cast it. I tried the following but, am not able to get the response anywhere. Had the configuration file "camel-context.xml" as

camelcontext

2012-11-26 Thread tamil13
I have one doubt regarding camelcontext using spring. In our project They used 2 camel configuration xml which are camel-context.xml and archive-camel-context.xml. In both, They used and . but they haven't used to invoke that camels in main. instead, They used import org.apache.camel.spring.Main

Re: CXF Continuations

2012-11-26 Thread Willem jiang
Hi Sergey, Current camel-cxfrs is leverage the same continuation mechanism that CXF 'manages'. I think the AsyncResponse could make the code more easier but it will not support the old version CXF any more. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fuse

Re: Set body to length of header string in Spring DSL?

2012-11-26 Thread Willem jiang
Hi, Does the header "name" value is String? If it is not , you'd better to convert it to a String. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (E

Re: CXF proxy for ws security

2012-11-26 Thread Willem jiang
Just a comments for access the soap headers from other data format. PAYLOAD data format, you can access the soap header from CxfPayload which is store in the Camel Message body like this. CxfPayload payload = exchange.getIn().getBody(CxfPayload.class); List soapHeaders = payload.getHeaders(); PO

Re: JMX attribute - Number of failures handled

2012-11-26 Thread gilboy
Thanks Assume an exception happens in my route and i have an error handler which places the message on a queue. In this instance would the *failures handled* increase or does it only increment via onException ()..handled(true).. syntax? Joe -- View this message in context: http://camel.465427

Set body to length of header string in Spring DSL?

2012-11-26 Thread dunnlow
(a simplification of an earlier question - I'm using camel 10.0, spring 3.1) Can someone tell me how, *using Spring DSL*, to set the message body to the size of the message header named "name"? I don't care if it's simple, or a different script language (I can't get any to work). Something li

Intercepting message for testing not working

2012-11-26 Thread lleclerc
Hi, I am trying to do testing on a route, but I can't see what I am doing wrong. I have this method from MyClass : public RouteBuilder createRoute(...) { ... from(timer).setHeader(Exchange.HTTP_QUERY, ...) .to(http4) .to(seda); from(seda).unmarshal(..).process(); ... } Now I want to test the ro

Re: Marshalling POJO class to JSON String formatted output

2012-11-26 Thread Martin Stiborský
Sorry guys, lazy, tired me, not thinking before asking. Of courser there is byte[] in the body... for (Exchange receivedExchange : receivedExchanges) { String json = new String((byte[]) receivedExchange.getIn().getBody(), "UTF-8"); System.out.println("JSON String: " + json)

Marshalling POJO class to JSON String formatted output

2012-11-26 Thread Martin Stiborský
Hello guys, I'd like to ask you, I have a POJO classes, holding data representation of various kinds of data entities. Output of my Camel routes is JSON String returned to browser as response. I thought it would be easy to marshall POJO to JSON formatted String with Jackson, but I have something wr

Re: CXF proxy for ws security

2012-11-26 Thread Daniel Kulp
On Nov 21, 2012, at 5:51 AM, Jesper Nygårds wrote: > Great thanks, Daniel! > > That solved the problem. I have a hard time finding any documentation about > CXF_MESSAGE mode. What is the difference between this and the PAYLOAD mode? MESSAGE (or RAW) pretty much is equivalent to passing a raw I

If header (a string) exists and length is > 5, then.... via Spring DSL?

2012-11-26 Thread dunnlow
With camel 2.10 and Spring 3.1 I am trying to test to see if a string in a header exists OR is too short. The test for null works as expected, but I seem to be unable to check the length. Any thoughts as to why? request.headers.get('name')==null || request.headers.get('name'

Retroactive message routing possible ?

2012-11-26 Thread c031917
I have two AMQ brokers A and B, duplex & statically connected, like the supermarket example in AMQ in action, Chapter 10. Broker B is embedded in Camel to implement routing by pure configuration. Broker A runs standalone. A Java producer on A is feeding messages to a topic. They are delivered an

Re: How to avoid starting a route multiple times?

2012-11-26 Thread klauss42
I use the Quartz component: This route runs every 30 seconds which is the desired behavior. Klaus -- View this message in context: http://camel.465427.n5.nabble.com/How-to-avoid-starting-a-route-multiple-times-tp5723236p5723248.html Sent from the Camel - Users maili

Re: DataFormat SOAPJaxb - ContextPath

2012-11-26 Thread Claus Ibsen
Hi Ah there could be an omission that placeholders are not happening in . Fell free to log a JIRA ticket http://camel.apache.org/support On Mon, Nov 26, 2012 at 12:17 PM, yodamad wrote: > Hi, > > I'm currently using service-mix-4.4.1 and I'm trying to configure my camel > routes. > I need to e

Re: How to avoid starting a route multiple times?

2012-11-26 Thread Claus Ibsen
On Mon, Nov 26, 2012 at 2:36 PM, wrote: > Hello Camel experts > I have a scheduled route that runs every few minutes to do some background > work. If for whatever reason the route takes longer than expected, the > schedule may start another execution of the route. > Is there an easy way to say th

Re: Call constructor from route

2012-11-26 Thread JasonN
Christian Mueller wrote > Can you use a scripting language? > > Sent from a mobile device > Am 21.11.2012 12:46 schrieb "JasonN" < > jasonnorth3001@ > >: > >> Thanks for your help. >> >> That's a shame though as you may not have control over the class to be >> able >> to add default constructor

Re: CXF Continuations

2012-11-26 Thread Sergey Beryozkin
On 26/11/12 03:23, Willem jiang wrote: When you use camel-cxfrs, or camel-cxf component, it is using CXF continuation by default. You can go through the code to check out how we use it :) I wonder how how can a cxfrs consumer be enhanced to support JAX-RS 2.0 suspended invocations (which are i

How to avoid starting a route multiple times?

2012-11-26 Thread Klaus . Schroeder
Hello Camel experts I have a scheduled route that runs every few minutes to do some background work. If for whatever reason the route takes longer than expected, the schedule may start another execution of the route. Is there an easy way to say that the route is not started again, if it is still

Re: Camel 2.10.2 timer component does not fire at startup

2012-11-26 Thread alberto.zigoni
Thanks Claus, I tried this, but it didn't work. I tried both with delay and initialDelay. This wasn't happening with previous versions of Camel, this is why I'm writing here. Besides, it wouldn't explain why, after a manual stop/start of the route via JMX, the timer fires right after the route i

Re: Camel 2.10.2 timer component does not fire at startup

2012-11-26 Thread Claus Ibsen
Oh and you can use delay=1000 or something for the 1st firing, to be after 1 sec, and then after that the delay option is used On Mon, Nov 26, 2012 at 2:13 PM, Claus Ibsen wrote: > Hi > > It starts after 1800s. > > > On Mon, Nov 26, 2012 at 1:52 PM, alberto.zigoni > wrote: >> 1800s > > > > --

Re: Camel 2.10.2 timer component does not fire at startup

2012-11-26 Thread Claus Ibsen
Hi It starts after 1800s. On Mon, Nov 26, 2012 at 1:52 PM, alberto.zigoni wrote: > 1800s -- Claus Ibsen - Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Acti

DataFormat SOAPJaxb - ContextPath

2012-11-26 Thread yodamad
Hi, I'm currently using service-mix-4.4.1 and I'm trying to configure my camel routes. I need to externalize the contextPath value for my dataformat soapjaxb. I've tried several configuration and my variable is never replace by its value. Has anyone already done this kind of configuration ? T

Re: inOnly and original MEP

2012-11-26 Thread Claus Ibsen
On Mon, Nov 26, 2012 at 11:50 AM, maxence.dewil wrote: > Charles Moulliard-2 wrote >> Question : Do you send the message (= event) without taking care about the >> response or are you expecting the response ? > > Indeed we don't care about the response. It's just an event we send. > See this EIP

Re: inOnly and original MEP

2012-11-26 Thread Charles Moulliard
If you would like to send the same original message to several endpoints (= other systems), then you use the multicast EIP pattern ( http://camel.apache.org/multicast.html) which will copy for the message to the destination endpoints. Question : Do you send the message (= event) without taking car

Re: ftp-consumer: recovering a previous established connection

2012-11-26 Thread Claus Ibsen
Ah a typo of mine, I mean next poll. eg when the ftp consumer will run again. Then it will re-connect and pickup the files which wasn't transfered last time. On Mon, Nov 26, 2012 at 10:52 AM, Hilde wrote: > Hello Claus! > > Thanks for answering! The requirements are to download a whole range of >

LDAP connection via SSL

2012-11-26 Thread predie
Hello there. I was looking for documentation or example for setting up SSL connection for ldap component. Only what i found, was only JSSE Utility (http://camel.apache.org/camel-configuration-utilities.html) but ldap component is not supported. Any ideas how to set up SSL keystore in spring confi

Re: ftp-consumer: recovering a previous established connection

2012-11-26 Thread Hilde
Hello Claus! Thanks for answering! The requirements are to download a whole range of files that needs some time. The ftp-consumer component should cope with connection breaks and continue downloading after trying to reconnect. Could you please explain me what do you mean when talking about a pool

Re: inOnly and original MEP

2012-11-26 Thread Charles Moulliard
Maxence, The In object is only used in an InOnly exchange and Out when a response must be propagated back to the from() component. If you would like that your route exposed behind the endpoint "direct:eventRoute" or "seda:eventRoute" return a response, then you should define the setExchangePattern

Re: inOnly and original MEP

2012-11-26 Thread Claus Ibsen
On Mon, Nov 26, 2012 at 9:17 AM, maxence.dewil wrote: > Hi, > > I need some clarification for inOnly(String uri): the documentation states > ''Notice the existing MEP is restored after the message has been sent to the > given endpoint." > > However with the route below, I loose my original 'Input'

inOnly and original MEP

2012-11-26 Thread maxence.dewil
Hi, I need some clarification for inOnly(String uri): the documentation states ''Notice the existing MEP is restored after the message has been sent to the given endpoint." However with the route below, I loose my original 'Input' object: from("direct:myRoute") .process(new Processor() { pub