Re: getting exception for appending option providers=#cors-filter in camel cxfrs

2015-08-27 Thread Sergey Beryozkin
Hi There's no need to set this provider from the uri given that it is already registered on the rsServer bean. However, it may be useful for simpler URI-only configurations, I'll have a look... Sergey On 27/08/15 10:26, chaituu wrote: getting below error when i used camel 2.15.2 version .Is

Re: getting exception for appending option providers=#cors-filter in camel cxfrs

2015-08-27 Thread chaituu
registered cors-filter bean id like this. bean id=cors-filter class=org.apache.cxf.rs.security.cors.CrossOriginResourceSharingFilter/ cxf:rsServer id=dsServer address=http://0.0.0.0:10089/test; serviceClass=com.xxx.xxx.xx.testservice

Re: Is it safe to use ThreadLocalExchange to implement route scope for dependency injection?

2015-08-27 Thread Jan Zankowski
Just wanted to ping the thread in the hope someone will offer help.. I think the answer may also be useful to people in other situations who wonder how Camel works under the hood with regard to threads. Thanks! On Mon, Aug 24, 2015 at 12:47 PM, Jan Zankowski jan.zankow...@gmail.com wrote: Hi,

Re: Is it safe to use ThreadLocalExchange to implement route scope for dependency injection?

2015-08-27 Thread Romain Manni-Bucau
this is what I used to implement an @ExchangeScoped but it has several limitation, in particular when breaking the flow with .threads() or .multicast(). All is explained on http://camel.apache.org/threading-model.html . Using a camel interceptor would surely allow to pass the context through the

Re: getting exception for appending option providers=#cors-filter in camel cxfrs

2015-08-27 Thread chaituu
defined like above in the config like but getting the error.do i need change anything?its working in camel 2.9 version but not working in 2.15 version cxf version is 3.0.4. -- View this message in context:

Camel Velocity pass ArrayList

2015-08-27 Thread Copernico
Hi! I have a velocity template for send an email. In this template i send to our clients a list of items (JPA Entities) as an arraylist (is a result of a query which size may be diferent each time) Dear ${headers.name} You request ${headers.itemList.size} items #foreach(${item} in

Re: getting exception for appending option providers=#cors-filter in camel cxfrs

2015-08-27 Thread Sergey Beryozkin
Sorry, may be I got confused. The whole issue is about referring to a cors-filter instance from the URI, right ? You said if you remove it from the route URI then it is fine, and I also said you do not need if you have a cxfrs server bean where you do reference the same cors-filter anyway.

Re: getting exception for appending option providers=#cors-filter in camel cxfrs

2015-08-27 Thread Sergey Beryozkin
Yes this should be sufficient, however it is possible to enable a cxfrs server with a URI only without directly creating a bean, so in that case it can be handy to refer to specific instances... Sergey On 27/08/15 15:25, chaituu wrote: registered cors-filter bean id like this. bean

Re: Loading XML Routes from local directory

2015-08-27 Thread fxthomas
hi, Now sure of what exactly you want to do. As far as i understood , you want to keep all your routes in a XML file or multiple XML file 8specific for each route). I think the only option is currently is to use the loadRoutesDefinition which you have mentioned already. I have used it it

JSON to XML Conversion

2015-08-27 Thread anish.somadevan
Am trying to convert a JSON message to XML format as given below, dataFormats xmljson id=xmljson/ xmljson id=xmljsonWithOptions forceTopLevelObject=true trimSpaces=true rootName=newRoot skipNamespaces=true removeNamespacePrefixes=true/ route id=parseJSON from

Re: Is it safe to use ThreadLocalExchange to implement route scope for dependency injection?

2015-08-27 Thread Jan Zankowski
Right - I just found your code. The limitation you mention - async processors, threads(), multicast() - is exactly what the approach I describe is meant to overcome. When a situation like that happens, i.e. a new thread takes over, it gets a copy of the original exchange, and an

JSON to XML Conversion

2015-08-27 Thread anish.somadevan
Am trying to convert a JSON message to XML format as given below, dataFormats xmljson id=xmljson/ xmljson id=xmljsonWithOptions forceTopLevelObject=true trimSpaces=true rootName=newRoot skipNamespaces=true removeNamespacePrefixes=true/ route id=parseJSON from

Re: http4 ignoring CamelHttpPath

2015-08-27 Thread Raul Kripalani
I don't think it's expected behaviour. Normally I configure timeouts and the like in the AsyncHttpClientConfig directly. Doing that, the CamelHttpPath header works properly. I will check what you said, but it definitely sounds like a bug. Raúl. On 27 Aug 2015 04:17, Minh Tran

Re: Is it safe to use ThreadLocalExchange to implement route scope for dependency injection?

2015-08-27 Thread Raul Kripalani
Typically what you would do is store the object you want to propagate in an Exchange property, eg. just before a threads() DSL. On the other side of the concurrency threshold, you would unwrap the object back into its thread-bound structure from the Exchange property. If you have a look at the

Re: Camel Velocity pass ArrayList

2015-08-27 Thread Raul Kripalani
Could you please paste the itemList() function? Thanks. On 27 Aug 2015 18:17, Copernico engcopern...@gmail.com wrote: Hi! I have a velocity template for send an email. In this template i send to our clients a list of items (JPA Entities) as an arraylist (is a result of a query which size

Re: http4 ignoring CamelHttpPath

2015-08-27 Thread Raul Kripalani
On Thu, Aug 27, 2015 at 4:16 AM, Minh Tran darth.minhs...@gmail.com wrote: to uri=http4:myhost:80?httpclient.connectTimeout=1amp;httpclient.socketTimeout=12/ You have a typo related to casing. The option prefixes are httpClient (capital C, using lowerCamelCase). Nevertheless, we do

Re: http4 ignoring CamelHttpPath

2015-08-27 Thread Minh Tran
Oh I didn't notice the incorrect case. Thanks for looking into this, much appreciated! On 28/08/2015, at 7:53 AM, Raul Kripalani r...@evosent.com wrote: On Thu, Aug 27, 2015 at 4:16 AM, Minh Tran darth.minhs...@gmail.com wrote: to

Re: CXF SOAP Message Sent from a Camel Client Twice When No HTTP Response Received

2015-08-27 Thread Raul Kripalani
Are you sure the first request was not an HTTP request that ended with an 401 Unauthorized? Are you using some kind of HTTP auth? If that's the case and you don't set up preemptive auth (for HTTP Basic), it is expected for the server to see 2 wire requests. Could you please try enabling the CXF

Re: getting exception for appending option providers=#cors-filter in camel cxfrs

2015-08-27 Thread chaituu
even if i remove it from the route URI also its not working.can you check from your side once.as per doc http://camel.apache.org/cxfrs.html providers Since Camel 2.12.2 set custom JAX-RS providers list to the CxfRs endpoint. providers=#MyProviders initially i didn't checked the logs properly so

CXF SOAP Message Sent from a Camel Client Twice When No HTTP Response Received

2015-08-27 Thread segev
We came across the following issue when using the Camel CXF component to invoke a SOAP request with Payload mode over HTTPS on a third party service. The third party server provides two endpoints primary and secondary. As part of certifying our system with this service (fail over test), we were

getting exception for appending option providers=#cors-filter in camel cxfrs

2015-08-27 Thread chaituu
getting below error when i used camel 2.15.2 version .Is it required to append cors-filter in the from endpoint from uri=cxfrs://bean://dsServer?providers=#cors-filter/ as I have already referenced cors-filter in cxf:providers tag in the CxfRs endpoint. when i removed providers=#cors-filter

Re: Camel CXF Transport works within Blueprint only when XSD validation is disabled

2015-08-27 Thread metatech
Hello Aki, Thanks for your reply. I understand from your explanation that this limitation might stay for some time. To avoid disabling Blueprint XSD validation entirely, I patched the Blueprint core XSD to allow id attributes starting with *.. This is of course not an elegant solution, but it

RE: Idempotent consumer query

2015-08-27 Thread Hans Orbaan
Hi, You might want to consider implementing your own IdempotentRepository. You can increment a counter when add or confirm is called. Then the contains method should only return true when you have reached 5. With kind regards, Hans Orbaan -Oorspronkelijk bericht- Van: gilboy

Idempotent consumer query

2015-08-27 Thread gilboy
Hi I have a use case were I want to process the same message on my route up to a maximum of 5 times. I understand the idempotent consumer can be used to ensure we don't process the same messages twice. Just wondering if there exists already something similar to the idempotent consumer were you