HTTP Basic Authentication

2013-10-25 Thread martin11
Hello, I`m trying to set BASIC Authentication on HTTP component (camel ver. 2.11.0). I know that I can use header settings like this one: .setHeader("Authorization", constant("Basic base64string")) and it works fine. But I`m looking for more elegant way to setup basic auth. Something like in CXF

Re: HTTP Basic Authentication

2013-10-28 Thread martin11
Hi Christian, I tried to use HTTP auth options: .to("http://{{server}}:{{port}}/{{address}}?authMethod=Basic&authUsername={{user}}&authPassword={{password}}";) But it fails again: INFO - Basic authentication scheme selected DEBUG - Took 1889 millis to send to: Endpoint[http://172.24.40.110:598

HttpOperationFailedException not throwed on response code 302

2013-11-11 Thread martin11
Hello, I`m using camel ver. 2.11.0 and HTTP component to call SSL (port 443) REST web services like this: http://{{address}}:{{port}}/{{context}}?httpClientConfigurerRef=httpClientConfig"/> For SSL I used my implementation (httpClientConfig) of org.apache.camel.component.http.HttpClientConfigurer

Multiple endpoints with SSL by using http component

2013-11-15 Thread martin11
Hello, I use HttpClientConfigurer in camel ver. 2.11.0 to use SSL on HTTP component: private static String PROTOCOL = "http"; authhttps = new Protocol(PROTOCOL, new AuthSSLProtocolSocketFactory( new URL("file:" + keyStore), keyStorePassword, new U

Re: Multiple endpoints with SSL by using http component

2013-11-17 Thread martin11
I found nice blog about multiple SSL keystores: http://codyaray.com/2013/04/multiple-keystores-in-apache-camelhttpclient I will try it by this way. -- View this message in context: http://camel.465427.n5.nabble.com/Mu

Running routes blocks timer event

2013-11-25 Thread martin11
Hello, I`m using camel ver. 2.11.0. I have multiple routes triggered by timer componnet like this: ...my processing... ...my processing... So when route1 running too long, it blocks processing from route2. Timer event is not generated until route1 is not finished. And rout

Random unsuccessful read from file

2013-12-02 Thread martin11
Hello, I have a route triggered by timer where I read data (zulu time) from file (using poolEnrich) and at the end of route I replace data in file for next route iteration. Now after deploy on server I found following problem: - sometimes data are not loaded from file and poolEnrich return only 0

Re: Random unsuccessful read from file

2013-12-03 Thread martin11
Hello Claus, I set timeout on poolEnrich but the error occured again. Should it be problem (or feature) when using sendEmptyMessageWhenIdle=true on file endpoint? The server is always in high load and when I try to read data from file it`s possible that file system is not responding immediately

Component singleton for all routes

2014-08-20 Thread martin11
I have a two threads (routes with different timer id in consumer). I created my own camel component (with endpoint and producer). This component should handle concurrency access (read/write) to datastore (LDAP) for all threads. >From debug I see that each thread/route create its own instance of c

Re: Component singleton for all routes

2014-08-21 Thread martin11
You are right Claus. MyComponent extends DefaultComponent and it is instanced only once but createProducer() on Endpoint is called for every thread. So this is the point of my issue. I have to resolve shared producer over all threads! It's clear to me now. Thanks -- View this message in contex

Re: Component singleton for all routes

2014-08-21 Thread martin11
Yes, isSingleton of MyProducer returns 'true' but ProducerCache in camel core is new instance for every thread and then createProducer() is called once per thread. -- View this message in context: http://camel.465427.n5.nabble.com/Component-singleton-for-all-routes-tp5755446p5755474.html Sent f

Re: Component singleton for all routes

2014-08-21 Thread martin11
There is my test context: THREAD-1 THREAD-2 -- View this messa

Re: Component singleton for all routes

2014-08-21 Thread martin11
Hi, I resolved my problem by static synchronised inner class in producer: public class MyProducer extends DefaultProducer { private static final Logger LOGGER = LoggerFactory.getLogger(MyProducer.class); public void process(Exchange exchange) throws Exception { // Test synchroni

JPA: Transaction marked as rollbackOnly

2013-04-05 Thread martin11
Hello, I'm using latest camel 2.10.4 and I'm trying to learn JPA component. I want to use database table as a logical queue (remove detached row from table) There is my camel context: JPA bean configuration:

CXF consumer by soapAction

2013-04-22 Thread martin11
Hello, I`m using camel ver. 2.10.4 and I want to create web service by using CXF (contract-first approach) and I have two method (Add & Remove) in single WSDL: http://www.test.com/nest/schemas/AdditiveRole"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";

CXF stop working after upgrade to 2.11

2013-05-10 Thread martin11
Hello, after upgrade Camel from 2.10.4 to 2.11.0 I got an exception: Caused by: java.lang.ClassNotFoundException: org.apache.cxf.common.util.PropertyUtils at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) ~[na:1.6.0_26] at org.a

Re: CXF stop working after upgrade to 2.11

2013-05-11 Thread martin11
Hi Claus, thanks for good hint. I changed dependencies: org.apache.camel camel-cxf ${camel.version} org.apache.cxf cxf-rt-transports-http ${cxf.version} and I got new exception: Caused by: java.io.IOException: Cannot find any registered HttpDestinationFactory from t

Re: An LDAP Consumer would be the LDAP server itself!

2012-10-31 Thread martin11
Hi Claus, Thanks again for your help! I resolved my problems by following configuration: http://camel.apache.org/schema/spring";> BTW: I have ordered your book Camel In Action. Looks like very helpful for Camel newbie. Thanks for th

CXFRS Producer

2012-11-05 Thread martin11
Hello,I`m trying call REST web service by using cxfrs component and I got following exception: [mel-1) thread #0 - timer://foo] idationXmlBeanDefinitionReader INFO Loading XML bean definitions from class path resource [META-INF/cxf/cxf.xml] [mel-1) thread #0 - timer://foo] idationXmlBeanDefinition

Re: CXFRS Producer

2012-11-06 Thread martin11
Hello Willem,thank for your answer. Looks that you have right. Let me describe my situation. I have XML file which I want to use together with freemarker. I already tested my XML to call REST web service from SoapUI tool and it works well.*/ws-read.xml/* template:

Re: CXFRS Producer

2012-11-06 Thread martin11
Hi Willem, thank you for helping me. I`m new to Camel and unfortunately it is not clear for me. I don`t want to use ClientProxyAPI becaouse it require a resource class. I want just: 1) take XML template 2) fill properties in XML by freemarker 3) setup custom value in header of service message 4)

Re: CXFRS Producer

2012-11-06 Thread martin11
Hi, finaly I found source of my original exception. I had garbage in my pom.xml* org.apache.cxf cxf-rt-transports-http 2.6.2 But my camel version is *2.10.2* which depends on apache-cxf-api wersion 2.6.3 (btw, it is missing in http://mvnrepository.com/) I downloaded camel sources an

Re: LDAP connection via SSL

2012-11-27 Thread martin11
If you don't want to explicitly set javax.net.ssl in Java command line, you can set it in applicationContext file in the fashion of Spring. /path/trusted.jks @see spring forum

adviceWith() does not start merged route

2012-12-05 Thread martin11
Hello, I`m using Camel ver. 2.10.1 and my route is not started when I use AdviceWith within RouteBuilder. Here is my context: ... ... // some CXFRS calls... and route builder java code: public class RouteBuilder extends org.apache.c

disable timer for unit tests

2013-02-10 Thread martin11
Hello, I use Camel ver. 2.10.1 and in production context I use timers (cca 10sec.) to create an event on route. I also create unit tests (extended from CamelSpringTestSupport) for my production context to make tests on individual routes. When I run my tests, timers expires and start new route. Be

Re: disable timer for unit tests

2013-02-11 Thread martin11
Thanks for good hints. I did only two steps configuration it works fine ;-) 1. stop all timer routes in init method 2. and by adviceWith I replaced the FROM of affected routes @Before public void init() throws Exception { context.stopRoute("myRouteId"); RouteDefinition route = context.get

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. http://someAddress/context?httpClientConfigurerRef=myHttpClientConfig"/> I also have a Unit Tests for production context where I intercept http calls. Since I switched on SLL in