Intercept HTTP where I use httpClientConfigurerRef

2013-02-14 Thread martin11
Hello, I`m using http component for calling some web services and because of SSL I created my own HttpClientConfigurer. to uri=http://someAddress/context?httpClientConfigurerRef=myHttpClientConfig/ I also have a Unit Tests for production context where I intercept http calls. Since I switched on

Re: Configuring the Camel http4 component

2013-02-14 Thread ddewaele
Thx for the relpy... Somebody from the team did look into the recipient list for this type of behavior but opted not to use it due to issues with https connection pooling. I didn't follow it up that closely, but are you aware of potential issues with using recipient list to create dynamic

Intercepting https endpoints with proxy config not working

2013-02-14 Thread ddewaele
Hi, I'm trying to intercept the following https endpoint using the camel:interceptSendToEndpoint component : camel:to

camel-ssh - SSH keys authentication

2013-02-14 Thread Martin Stiborský
Hello guys, I need to use camel-ssh in my route, also, I need authentication with SSH keys to the remote server. I can't figure out how to configure the SSH producer in Camel. Now I started digging in camel-ssh source codes, but that is a long trip for me right now :( First of all, I'm not sure,

Re: camel-ssh - SSH keys authentication

2013-02-14 Thread Martin Stiborský
As usually, problem solved few minutes after I posted this call for help message. Really there was a problem with loading the private key from resources. Now it works...my next message will be about updating the camel-ssh wiki :) On Thu, Feb 14, 2013 at 10:37 AM, Martin Stiborský

Re: camel-ssh - SSH keys authentication

2013-02-14 Thread Scott Cranton
Glad you figured it out. Yeah, the camel-ssh page does need some attention. Thanks for the feedback, and I look forward to seeing your suggested updates to the doc. The certFilename is just a shorthand for creating a FileKeyPairProvider, which is identical to what the SshComponentSecurityTest is

Re: how to set body clipped length on traceer using jmx

2013-02-14 Thread Claus Ibsen
On Wed, Feb 13, 2013 at 3:48 PM, Preben.Asmussen p...@dr.dk wrote: that would have been really useful for troubleshooting . Maybe a place for a enhancement ? Yeah feel free to log a JIRA. And as always we love contributions. I suggest to add a operation to the CamelContextMBean which can set

Re: camel-ssh - SSH keys authentication

2013-02-14 Thread Martin Stiborský
I can try help there as well. I was looking for a chance to make my first camel commit anyway :) On Thu, Feb 14, 2013 at 12:00 PM, Scott Cranton sc...@cranton.com wrote: Glad you figured it out. Yeah, the camel-ssh page does need some attention. Thanks for the feedback, and I look forward to

Re: Configuring the Camel http4 component

2013-02-14 Thread Claus Ibsen
On Thu, Feb 14, 2013 at 9:21 AM, ddewaele ddewa...@gmail.com wrote: Thx for the relpy... Somebody from the team did look into the recipient list for this type of behavior but opted not to use it due to issues with https connection pooling. I didn't follow it up that closely, but are you

Re: Configuring the Camel http4 component

2013-02-14 Thread Claus Ibsen
On Thu, Feb 7, 2013 at 2:44 PM, ddewaele ddewa...@gmail.com wrote: We are currently using the Camel http4 component to perform both http and https calls either directly or through a proxy. All these scenarios work by configuring the http4 component in a certain way ex: plain http without

Re: Using Dead letter channel with ActiveMQ?

2013-02-14 Thread Claus Ibsen
On Wed, Feb 13, 2013 at 6:45 PM, dunnlow dunn...@yahoo.com wrote: I have a solution that seems to be working. I have assigned a context errorHandler and have a deliverypolicy that has a dead letter uri (a route that dumps to a file), like: camelContext errorhandlerRef=errorHandler/

Re: ExchangeHelper.copyResults(...) doesn't copy exchange pattern

2013-02-14 Thread Claus Ibsen
On Wed, Feb 13, 2013 at 4:42 PM, Marek Pszczolka mpszczo...@gmail.com wrote: I'm migrating our legacy code to new Camel so I would like to do only absolutely required changes :) That's why I used this existing inline copying processor. You are right, send(direct:..., exchange.copy()); works

Re: Always receive String Message even with jmsMessageType set to Bytes

2013-02-14 Thread Claus Ibsen
On Wed, Feb 13, 2013 at 10:46 PM, yxzhao yxz...@stonewain.com wrote: Hi All, We have a route which gets messages from an MQ queue. We expect messages in bytes, but always receive java.lang.String even when we set our route as below: route id=queue-incoming from

Re: How to create csv with UTF-8 encoding using the Spring/XML DSL

2013-02-14 Thread Claus Ibsen
On Thu, Feb 14, 2013 at 6:15 AM, sarfaraj sarfarajsay...@gmail.com wrote: Hi, I want to create csv file with UTF-8 encoding. Using *CSV *component i am abale to create the csv file but with ANSI encoding. (Please refer below code) to uri=bean:csvTranslator / marshal

Re: How to create csv with UTF-8 encoding using the Spring/XML DSL

2013-02-14 Thread sarfaraj
Looks like it's available in Camel 2.9.3. What about 2.8.5 ? do we have any other way to achieve the same in 2.8.5 ? -- View this message in context: http://camel.465427.n5.nabble.com/How-to-create-csv-with-UTF-8-encoding-using-the-Spring-XML-DSL-tp5727566p5727586.html Sent from the Camel -

URI references to Objects in the Registry

2013-02-14 Thread Scott Cranton
I've just noticed the reference syntax that some components use, but its not clear to me exactly how it works, and more importantly how new components are supposed to use it correctly... I don't see any documentation on it, and I've only found some mentions of it in the JIRA where it was created

How to use throwExceptionOnFailure=false to differentiate HTTP Status codes

2013-02-14 Thread deepak_a
All, I am using the option throwExceptionOnFailure=false to ensure I Camel doesn't throw exceptions for HTTP Status code 500 and above (since I want to retry) By default Camel throws HttpOperationFailedException for all HTTP responses where status code is 400+ Pls see below for snippet from my

Re: camel-ssh - SSH keys authentication

2013-02-14 Thread Martin Stiborský
Still one problem…the unit test was fine, but now in OSGi environment, there are more troubles… Is there some trick how to get resource from a bundle? I can't get a reference to the key file stored in src/main/resources :( On Thu, Feb 14, 2013 at 12:25 PM, Martin Stiborský

Re: How to create csv with UTF-8 encoding using the Spring/XML DSL

2013-02-14 Thread Claus Ibsen
On Thu, Feb 14, 2013 at 1:18 PM, sarfaraj sarfarajsay...@gmail.com wrote: Looks like it's available in Camel 2.9.3. What about 2.8.5 ? do we have any other way to achieve the same in 2.8.5 ? You can try setting the charset on the exchange property as mentioned in the description of the

Re: How to handle error when - Renaming file from: *** failed due cannot delete from file

2013-02-14 Thread Claus Ibsen
On Wed, Feb 13, 2013 at 4:43 PM, briane80 bel...@ccea.org.uk wrote: Converting to the byte array has worked thanks for the quick reply. Thanks for reporting back. There is a little bug in Camel so I have logged a ticket ]https://issues.apache.org/jira/browse/CAMEL-6081 -- View this

Re: camel-ssh - SSH keys authentication

2013-02-14 Thread Claus Ibsen
On Thu, Feb 14, 2013 at 2:57 PM, Martin Stiborský martin.stibor...@gmail.com wrote: Still one problem…the unit test was fine, but now in OSGi environment, there are more troubles… Is there some trick how to get resource from a bundle? I can't get a reference to the key file stored in

Re: How to use throwExceptionOnFailure=false to differentiate HTTP Status codes

2013-02-14 Thread Claus Ibsen
Hi Try configuring it on to uri=http://www.google.com/ On Thu, Feb 14, 2013 at 2:24 PM, deepak_a angesh...@gmail.com wrote: All, I am using the option throwExceptionOnFailure=false to ensure I Camel doesn't throw exceptions for HTTP Status code 500 and above (since I want to retry) By

Re: How to use throwExceptionOnFailure=false to differentiate HTTP Status codes

2013-02-14 Thread deepak_a
Hi, Do you mean to say - point to www.google.com instead of my servlet? But I have set up my servlet in such a way it always sends back a 500 0r 501 as Status Code. -- View this message in context:

Re: URI references to Objects in the Registry

2013-02-14 Thread Claus Ibsen
Hi Scott On Thu, Feb 14, 2013 at 1:38 PM, Scott Cranton sc...@cranton.com wrote: I've just noticed the reference syntax that some components use, but its not clear to me exactly how it works, and more importantly how new components are supposed to use it correctly... I don't see any

Re: Always receive String Message even with jmsMessageType set to Bytes

2013-02-14 Thread yxzhao
We can verify that if the MQ message is sent with MQMessage.format = MQConstants.MQFMT_STRING, then our route will receive text message. Otherwise, it will receive a byte array. Actually, the sending app uses the same write bytes method to put the message into the queue. The same message can be

Re: Always receive String Message even with jmsMessageType set to Bytes

2013-02-14 Thread Claus Ibsen
On Thu, Feb 14, 2013 at 4:22 PM, yxzhao yxz...@stonewain.com wrote: We can verify that if the MQ message is sent with MQMessage.format = MQConstants.MQFMT_STRING, then our route will receive text message. Otherwise, it will receive a byte array. Actually, the sending app uses the same write

Re: Help with mocking a filter bean method call

2013-02-14 Thread Henryk Konsek
In my actual test, my bean is loaded up with spring component scan (most of the tests that use this are integration tests) Actually I would not advice putting Mockito mocks into integration tests, as the latter approach makes your test hard to maintain and control. But of course you can

Re: How to use throwExceptionOnFailure=false to differentiate HTTP Status codes

2013-02-14 Thread deepak_a
Hi, Thanks, works fine now after setting the field to false in to uri=http://www.google.com?throwExceptionOnFailure=false/ My aim is to segregate HTTP response status 400 and 500. i.e. for HTTP Statuses: 400-499, there should not be any retries while status 500+ - we need to

Re: Always receive String Message even with jmsMessageType set to Bytes

2013-02-14 Thread David Karlsen
Oh- of course. I overlooked the fact that it was a consuming route. Btw. Wmq sets a custom IBM prefixed property defining the sending charset. Ping me directly if you want me to look it up tomorrow at work where I have the code. Den 14. feb. 2013 16:44 skrev Claus Ibsen claus.ib...@gmail.com

Re: MongoDB Jackson Date Mapping Option

2013-02-14 Thread Ron Anderson
Hi Raul, Thanks for your helpful suggestion. I'm having an issue though that I can't seem to figure out and wondering if you have any ideas. Trying your suggestion I've set up the DataFormat as: ObjectMapper objectMapper = new ObjectMapper();

Re: MongoDB Jackson Date Mapping Option

2013-02-14 Thread Raul Kripalani
Try adding a .convertBodyTo(String.class) just after the .marshal(jackson) and before the MongoDB endpoint. Regards, *Raúl Kripalani* Apache Camel Committer Enterprise Architect, Program Manager, Open Source Integration specialist http://about.me/raulkripalani |

How do I get instance of JobDetail from a quartz route

2013-02-14 Thread Zemin Hu
I have a route look like: route from uri=quartz://report?cron=0+0/2+8-18+?+*+MON-FRI/ ... /route Inside of this route, I need to access the JobDetail or StdScheduler since the configuration in the cron job may change, but I still can modify business logic within the route based on changed time

Re: camel-ssh - SSH keys authentication

2013-02-14 Thread Martin Stiborský
Ok, so camel-ssh needs some love, to make it better…ok. But without modifications in camel-ssh, I'm just not able to use it with my SSH key, I tried like all possible combinations now. SshComponent sshGitComponent = new SshComponent(); sshGitComponent.setHost(localhost);

create NettyEndpoint Instance

2013-02-14 Thread Tyler Durvik
I would like to create a NettyEndpoint with a specified NettyConfiguration, but cannot find an example on how to do this. So I have the following: public class MyDataRoute extends RouteBuilder { @Override public void configure() throws Exception { // set up my decoders/encoders

Re: How do I get instance of JobDetail from a quartz route

2013-02-14 Thread Henryk Konsek
Hi Zemin, from uri=quartz://report?cron=0+0/2+8-18+?+*+MON-FRI/ I need to access the JobDetail QuartzEndpoint quartzEndpoint = (QuartzEndpoint) camelContext.getEdnpoint(quartz://report?cron=0+0/2+8-18+?+*+MON-FRI); JobDetail jobDetail = quartzEndpoint.getJobDetail(); I'm afraid our

Re: MongoDB Jackson Date Mapping Option

2013-02-14 Thread Ron Anderson
Well it almost solved it. It cured my exception and is now persisting the date in the database but it is storing it as a BSON string so still not recognized as an ISODate or BSON date type so no date functions yet work. Any way for the JSON date representation to get converted to BSON date type?

Re: camel-ssh - SSH keys authentication

2013-02-14 Thread Martin Stiborský
So, maybe the problem is really in the camel-ssh component, because, it's possible to get the key from resources, like that: from(cxfrs:bean:gitServer) .routeId(GitRoutes) .choice() .when(header(CxfConstants.OPERATION_NAME).isEqualTo(getRepositories))