Re: [Very Likely Bug] Adding onException into RouteBuilder overwrites assigned route ID with default route ID

2013-01-22 Thread Claus Ibsen
Hi You should use .routeId to assign the ID of the route. On Wed, Jan 23, 2013 at 8:49 AM, Mikael Fernandus Simalango wrote: > Hi, > > I spotted somewhat surprising behavior when configuring route builder > via groovy script. If the route builder does not have onException > clause, I can assign

[Very Likely Bug] Adding onException into RouteBuilder overwrites assigned route ID with default route ID

2013-01-22 Thread Mikael Fernandus Simalango
Hi, I spotted somewhat surprising behavior when configuring route builder via groovy script. If the route builder does not have onException clause, I can assign route ID to each of the configured routes. This route IDs will stay intact when I invoke context.getRouteDefinition("routeID"). However,

Re: Invalid endpoint on recipient list

2013-01-22 Thread Claus Ibsen
On Tue, Jan 22, 2013 at 11:06 PM, jkorab wrote: > Hi, > > I am going through the recipient list pattern and am trying to work out what > constitutes an "invalid endpoint". Given the following RouteBuilder: > > public class RecipientListUnrecognizedEndpointRouteBuilder extends > RouteBuilder { >

Invalid endpoint on recipient list

2013-01-22 Thread jkorab
Hi, I am going through the recipient list pattern and am trying to work out what constitutes an "invalid endpoint". Given the following RouteBuilder: public class RecipientListUnrecognizedEndpointRouteBuilder extends RouteBuilder { @Override public void configure() throws Exception {

Re: Tokenize Producing XML That is Not Well-Formed

2013-01-22 Thread gheidorn
In classic fashion, I've answered my own question after a night of debugging. For posterity, I will share that I was converting the String representation of my XML into a w3c Document object, and then splitting that Document object using tokenize xml. Probably not intended to work like that! Whe

Tokenize Producing XML That is Not Well-Formed

2013-01-22 Thread gheidorn
I have the following XML structure: ** ** Element c is optional. I'm using split tokenize on element b, which works great when element c is present. I get tokens in the form of: ** ** The issue is when c is not present, tokenize returns tokens in the form of: * * For some odd reason t

Re: Found a bug in overriding URI using camel-http4 + documentation problem

2013-01-22 Thread Christian Müller
I updated the WIKI page. It should be online in a few hours. Could you have a look at the unit test https://svn.apache.org/repos/asf/camel/trunk/components/camel-http4/src/test/java/org/apache/camel/component/http4/HttpWithHttpUriHeaderTest.java It shows how it works. Best, Christian On Tue, Ja

Re: HL7 component works in Eclipse IDE but not when exported to JAR

2013-01-22 Thread Christian Ohr
Yes, the camel-hl7 component of the upcoming Camel 2.11 release will depend on HAPI 2.0. Christian Am 22.01.2013 14:19, schrieb Adam Szczepaniak: Just an observation... Perhaps it is worth upgrading Hapi dependency on camel to Hapi 2+, as the HL7 Message in 2+ is fully serializable, so no need

Re: How to avoid that "" with camel cxf

2013-01-22 Thread Willem Jiang
Hi Charles, Setting the fault flag can tell camel-cxf consumer to treat the response as a fault message not a normal response. In this way the CXF fault interceptor chain can be used to generate the right soap fault instead of trying to marshal the exception object to XML. 发自我的 iPhone 在 2013-

Re: How to force http consuming route to run only once?

2013-01-22 Thread Henryk Konsek
> In fact, I tried the following which seemed to work > from("timer:httpRequestTrigger?repeatCount=1").to("http.. Great to hear that :) . > Isthere actually a real use case where from(http://...) makes sense? HTTP consumer is a polling one. It makes perfect sense to use it when you want to perio

Found a bug in overriding URI using camel-http4 + documentation problem

2013-01-22 Thread lleclerc
Hi, >From the documentation : http://camel.apache.org/http4.html *** You can override the HTTP endpoint URI by adding a header with the key, HttpConstants.HTTP_URI, on the message. from("direct:start") .setHeader(HttpConstants.HTTP_URI, constant("http:

Re: Dynamic Route Creation.

2013-01-22 Thread Henryk Konsek
> Thanks, I am able to configure as you said... Good to hear that. Better stick to the EIP (Dynamic Router, Recipient List, etc) than to low-level Camel API. > let me know whether i can use context.addRouteDefinitions(routeList). > addRouteDefintions method shows as deprecated.. All you need to

Re: How to do conditional entity persistence in JPA Consumer

2013-01-22 Thread Chris Wolf
Thank you for the advice! On Mon, Jan 21, 2013 at 4:55 PM, Christian Müller wrote: > Yes. You can set up your EntityManager using Spring/Blueprint and inject it > into your bean. In your bean you can use the EntityManager to > query/update/create entities. > IMO, it's simpler to do it in this way

Re: HL7 component works in Eclipse IDE but not when exported to JAR

2013-01-22 Thread Adam Szczepaniak
Just an observation... Perhaps it is worth upgrading Hapi dependency on camel to Hapi 2+, as the HL7 Message in 2+ is fully serializable, so no need to do any extra hl7 marshalling/unmarshalling on passing msgs between queues and endpoinds. etc. thanks Adam On Tue, Jan 22, 2013 at 12:49 PM, Christ

Re: HL7 component works in Eclipse IDE but not when exported to JAR

2013-01-22 Thread Christian Ohr
To generate an acknowledgement, you can call one of the generateAcknowledgement() methods of the ca.uhn.hl7v2.model.(Abstract)Message class. If you like, you can also address pure/detailed HAPI questions to the HAPI mailing list (see http://hl7api.sourceforge.net/mail-lists.html), which is subscri

Re: Dynamic Route Creation.

2013-01-22 Thread Syed
Thanks, I am able to configure as you said... let me know whether i can use context.addRouteDefinitions(routeList). addRouteDefintions method shows as deprecated.. Regards Jawahar -- View this message in context: http://camel.465427.n5.nabble.com/Dynamic-Route-Creation-tp5725835p5725984.html

Re: How to avoid that "" with camel cxf

2013-01-22 Thread Charles Moulliard
In my route, the exception is intercepted and handled parameter is true, that means that camel ErrorHandler will not retry onException(CamelAuthorizationException.class) .log(">> User not authorized") .handled(true) .process(new Processor() { @Ov

Re: Camel QuartzComponent failed on recreating endpoint

2013-01-22 Thread Denis Delangle
Hi, Thanks for your answer, I'll try this in a real environment. In my testcase, the error is not raised anymore but the process is not executed. (My testcase is attached here https://issues.apache.org/jira/browse/CAMEL-5993) Denis 2013/1/21 garrydias : > It´s a nice approach. > > I solved my pr

Re: Quartz component and context endpoint cache

2013-01-22 Thread Denis Delangle
Hi thanks for your answer, I created https://issues.apache.org/jira/browse/CAMEL-5993 with a junit test to reproduce the bug. Denis 2013/1/22 Claus Ibsen : > Hi > > That could indeed indicate a bug in Camel. > > Fell free to log a JIRA ticket in the issue tracker > http://camel.apache.org/suppor

Re: To through exception in case of SFTP connectivity failure

2013-01-22 Thread Claus Ibsen
On Mon, Jan 21, 2013 at 6:45 AM, dkum003 wrote: > Hi, > > I am using JSCh API for connecting with the SFTP location. > > When password or userid or url is not correct. we are not getting any error > from the API. > > I tried throwExceptionOnConnectFailed=true and maximumReconnectAttempts =0 > opti

Re: HL7 component works in Eclipse IDE but not when exported to JAR

2013-01-22 Thread Claus Ibsen
On Tue, Jan 22, 2013 at 6:49 AM, StanZ wrote: > Thanks Christian. > > I confirmed the hapi-base-1.2.jar was in the exported JAR lib. But > removing org.apache.servicemix.bundles.hapi 0.5.1_1 as you suggested > seems to have fixed the issue. It now works when I ran the program from > the JAR as we