Camel choice processor

2013-01-10 Thread dhruv.sachdeva
Hi , I have to write a unit test case for myclass which routes a message to queues using choice processor and checking predicates such as when. Here is a code snippet:- from("direct:setMessageIdentifier"). choice(). when(ns.xpath("/cus:CustomerUpdateRoot")

Re: Issue using camel-cxf and wss4j

2013-01-10 Thread Charles Moulliard
Different things should be done to improve what we have Why : The warn message which is created by wss4j has nothing to do with the existing problem ? We get this message in the log when we use WS-SECURITTY and camel-cxf with dataFormat=MESSAGE qtp370155726-26 DEBUG [org.apache.cxf.ws.security.w

Re: Failing over in-flight exchanges

2013-01-10 Thread narita
Component/Node Event Logging Feature - Where in hook a Processor after every component/node to log the message details (an efficient logging mechanism can be in place File/DB/Mongo etc). This is how a savepoint/milestone can be captured, so that on re-start (after crash), you have the intellignce(

Re: Setting JMS header

2013-01-10 Thread narita
Apologies for the late reply. I realized the difference and hooked a Processor to set the header prior to the JMSConsumer in the route, which worked. Thanks again, Claus. -- View this message in context: http://camel.465427.n5.nabble.com/Setting-JMS-header-tp5723165p5725217.html Sent from the C

Re: Camel choice processor

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 9:10 AM, dhruv.sachdeva wrote: > Hi , > I have to write a unit test case for myclass which routes a message to > queues using choice processor and checking predicates such as when. > Okay good luck with writing that test. Do you have any questions? > Here is a code snipp

Re: Issue using camel-cxf and wss4j

2013-01-10 Thread Charles Moulliard
I don't find info about this dataFormat (CXF_MESSAGE) in CXF. Does it exist ? On Thu, Jan 10, 2013 at 8:43 AM, Willem jiang wrote: > CXF_MESSAGE -- Charles Moulliard Apache Committer / Sr. Enterprise Architect (RedHat) Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com

Re: Issue using camel-cxf and wss4j

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 10:37 AM, Charles Moulliard wrote: > I don't find info about this dataFormat (CXF_MESSAGE) in CXF. Does it exist > ? Its in camel-cxf, and was recently added to it (eg within the last 6 months or so I think) > > On Thu, Jan 10, 2013 at 8:43 AM, Willem jiang wrote: > >> CX

Re: Issue using camel-cxf and wss4j

2013-01-10 Thread Charles Moulliard
That works now with this dataformat=CXF_MESSAGE when using Ws-Security & wss4j. Thx. On Thu, Jan 10, 2013 at 10:45 AM, Claus Ibsen wrote: > On Thu, Jan 10, 2013 at 10:37 AM, Charles Moulliard > wrote: > > I don't find info about this dataFormat (CXF_MESSAGE) in CXF. Does it > exist > > ? > > I

Re: Camel choice processor

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 10:29 AM, dhruv.sachdeva wrote: > Yes.Actually it was correctly how to test that. > Hi I suggest to read the docs at http://camel.apache.org/testing .. and the links from that page. And then give it a try and see how far you get. > > > -- > View this message in conte

Re: Issue using camel-cxf and wss4j

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 10:53 AM, Charles Moulliard wrote: > That works now with this dataformat=CXF_MESSAGE when using Ws-Security & > wss4j. Thx. > Ah great. Would someone with love for CXF and Camel mind helping with adding docs about these new data formats added to camel-cxf? I dislike when

Re: Issue using camel-cxf and wss4j

2013-01-10 Thread Willem jiang
I can take care of the document. It looks like we need to do a clean up before release Camel 2.11.0. -- 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/)

onException does not kick in, redelivery does not work with TransactionErrorHandler

2013-01-10 Thread Lampis Flavio
Hello Camel users I am new to this forum / mailing list. We are experiencing problems in our project with the combination of onError and TransactionErrorHandler. Our set up is a bit complicated. I hope you read through anyway. We want to distinguish between recoverable and nonrecoverable erro

Question camel cxf & CXF_MESSAGE

2013-01-10 Thread Charles Moulliard
Hi, Why do I get this cast error message using CXF_MESSAGE as dataformat for my camel cxf endpoint Here is the SOAP enveloppe created by camel using SOAP Dataformat qtp521246104-20 INFO [cxf-to-client] - >>> Response generated : http://schemas.xmlsoap.org/soap/envelope/"; xmlns:ns3="http://trai

Re: Issue using camel-cxf and wss4j

2013-01-10 Thread Charles Moulliard
Willem, That could be nice to create in camel cxf page doc a table describing for each DataFormat if we keep or skip headers and what is changed according to CXF interceptors (out and in) ... MESSAGE should be also marked as DEPRECATED now as it is replaces by RAW Regards, Charles On Thu, Jan

Re: onException does not kick in, redelivery does not work with TransactionErrorHandler

2013-01-10 Thread Claus Ibsen
Hi What Camel version do you use? And have you tried with a newer release? On Thu, Jan 10, 2013 at 11:27 AM, Lampis Flavio wrote: > Hello Camel users > > I am new to this forum / mailing list. > > We are experiencing problems in our project with the combination of onError > and TransactionErr

Re: Question camel cxf & CXF_MESSAGE

2013-01-10 Thread Babak Vahdat
Hi Don't know much about CXF itself but this is more than obvious as the code (DefaultCxfBinding line 344) is buggy because one can not simply cast an array of *primitive* type ("[B" means array of byte) to Object[] which is an array of *reference* type! You would get the same stack trace if you

Re: Question camel cxf & CXF_MESSAGE

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 11:54 AM, Babak Vahdat wrote: > Hi > > Don't know much about CXF itself but this is more than obvious as the code > (DefaultCxfBinding line 344) is buggy because one can not simply cast an > array of *primitive* type ("[B" means array of byte) to Object[] which is an > arra

Re: Question camel cxf & CXF_MESSAGE

2013-01-10 Thread Charles Moulliard
Should we raise a ticket to solve this issue ? On Thu, Jan 10, 2013 at 12:04 PM, Claus Ibsen wrote: > On Thu, Jan 10, 2013 at 11:54 AM, Babak Vahdat > wrote: > > Hi > > > > Don't know much about CXF itself but this is more than obvious as the > code > > (DefaultCxfBinding line 344) is buggy be

Re: Question camel cxf & CXF_MESSAGE

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 12:24 PM, Charles Moulliard wrote: > Should we raise a ticket to solve this issue ? > Yeah the class cast exception should not happen. Its a bug in camel-cxf. > > On Thu, Jan 10, 2013 at 12:04 PM, Claus Ibsen wrote: > >> On Thu, Jan 10, 2013 at 11:54 AM, Babak Vahdat >>

Re: How to build an outgoing tcp connection gateway that consumes messages?

2013-01-10 Thread Andrea Tarocchi
One option is using camel-mina component: http://camel.apache.org/mina.html andr, if necessary, writing your own custom codec. On Thu, Jan 10, 2013 at 11:59 AM, ggalka wrote: > Hi, > > what do you think, what would be the best/quickest way to implement tcp > client message consumer in current C

Re: Question camel cxf & CXF_MESSAGE

2013-01-10 Thread Babak Vahdat
Claus unfortunatly the iterator being returned there has got exactly the same bug marked with a TODO! See ObjectHelper lines 516..519 } else if (value.getClass().isArray()) { // TODO we should handle primitive array types? List list = Arrays.asList((Object[])value

AW: onException does not kick in, redelivery does not work with TransactionErrorHandler

2013-01-10 Thread Lampis Flavio
Hi Claus We're using these Versions Camel: 2.10.3 Spring: 3.0.7.RELEASE Kind regards, Flavio Freundliche Grüsse Flavio Lampis LIBSR Sie drucken diese E-Mail nicht aus? Die Umwelt dankt! -Ursprüngliche Nachricht- Von: Claus Ibsen [mailto:claus.ib...@gmail.com] Gesendet: Donnerstag, 10

Re: Question camel cxf & CXF_MESSAGE

2013-01-10 Thread Babak Vahdat
I logged a ticket for ObjectHelper: https://issues.apache.org/jira/browse/CAMEL-5948 Babak Babak Vahdat wrote > Claus > > unfortunatly the iterator being returned there has got exactly the same > bug marked with a TODO! > > See ObjectHelper lines 516..519 > > } else if (value.getClas

Re: onException does not kick in, redelivery does not work with TransactionErrorHandler

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 12:49 PM, Lampis Flavio wrote: > Hi Claus > > We're using these Versions > > Camel: 2.10.3 > Spring: 3.0.7.RELEASE I think we fixed something related to context scoped onException. Can you try defining them per route, instead of context scoped, as a workaround. And you ar

camel 2.10 & Spring 3.0.7 issue on Karaf 2.3.0

2013-01-10 Thread Charles Moulliard
Hi, When I deploy a camel project as a bundle on Karaf 2.3.0, Spring generates the following error that I don't really understand as classes are well packaged in the bundle 2013-01-10 13:04:26,204 | ERROR | ExtenderThread-2 | ContextLoaderListener | ?

Re: camel 2.10 & Spring 3.0.7 issue on Karaf 2.3.0

2013-01-10 Thread Claus Ibsen
Hi You would need Camel 2.11 to run on Karaf 2.3.x. Camel 2.10 does not support it to well. As its tied to Aries 0.3, and OSGi 4.2. Where as Karaf is Aries 1.0, and OSGi 4.3 etc. On Thu, Jan 10, 2013 at 1:13 PM, Charles Moulliard wrote: > Hi, > > When I deploy a camel project as a bundle on K

Re: camel 2.10 & Spring 3.0.7 issue on Karaf 2.3.0

2013-01-10 Thread Charles Moulliard
Claus, I'm using Fuse ESB 7 and create a container using Fabric --> FuseESB:karaf@fuse-aviva> info Karaf Karaf version 2.3.0.fuse-71-047 Karaf home /Users/chmoulli/Fuse/servers/fuse-esb-7.1.0.fuse-047 Karaf base /Users/chmoulli/Fuse/servers/fuse-esb-7.1.0.fuse-047 OSGi Fra

Re: camel 2.10 & Spring 3.0.7 issue on Karaf 2.3.0

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 1:21 PM, Charles Moulliard wrote: > Claus, > > I'm using Fuse ESB 7 and create a container using Fabric --> > > FuseESB:karaf@fuse-aviva> info > Karaf > Karaf version 2.3.0.fuse-71-047 > Karaf home > /Users/chmoulli/Fuse/servers/fuse-esb-7.1.0.fuse-047 >

Creating dynamic folder

2013-01-10 Thread tamil13
Hi. I want to create dynamic folder in dd-mm- based on some condition. how can we do? Below is the sample code. ${file:onlyname.noext} contains ${properties:fileName1}

Re: camel 2.10 & Spring 3.0.7 issue on Karaf 2.3.0

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 1:13 PM, Charles Moulliard wrote: > Hi, > > When I deploy a camel project as a bundle on Karaf 2.3.0, Spring generates > the following error that I don't really understand as classes are well > packaged in the bundle > > 2013-01-10 13:04:26,204 | ERROR | ExtenderThread-2 |

Re: camel-smpp in trx mode

2013-01-10 Thread Alex Anderson
On 4 January 2013 17:26, Christian Müller wrote: > I think we don't have another camel component where the endpoint is a > consumer and producer. I'm not sure how/if it works or if we hit problems > in other areas (exception handling, ...). We do this for the camel-smslib component. The endpoint

Re: Creating dynamic folder

2013-01-10 Thread Andrea Tarocchi
The error description explains the solution: "Use the fileName option to set the dynamic expression." Use fileName option for the dynamic part like this: Andrea. On Thu, Jan 10, 2013 at 1:30 PM, tamil13 wrote: > > Hi. I want to create dynamic folder in dd-mm- based on some condition. >

Re: camel 2.10 & Spring 3.0.7 issue on Karaf 2.3.0

2013-01-10 Thread Charles Moulliard
Sorry about my previous but I have posted the question here as I don't have access from Aviva customer to RedHat IRC channel or even WebMail (blocked) The project that I deploy is an example that we have in the Fuse Training and it works fine locally using mvn camel:run On Thu, Jan 10, 2013 at

Re: How to build an outgoing tcp connection gateway that consumes messages?

2013-01-10 Thread Andrea Tarocchi
I think that camel-mina works also as a producer ( e.g. in a .to(...) ) Another option could be camel-netty component: http://camel.apache.org/netty.html Andrea. On Thu, Jan 10, 2013 at 1:34 PM, ggalka wrote: > camel-mina for consuming messages (from(...)) uses tcp server connection > (acts a

Question about camel cxf & blueprint

2013-01-10 Thread Charles Moulliard
Hi, The following syntax is not supported http://www.osgi.org/xmlns/blueprint/v1.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:cxf="http://cxf.apache.org/blueprint/core"; xmlns:camelcxf="http://camel.apache.org/schema/blueprint/cxf"; xsi:schemaLocation="

[camel-bindy] bindy ignore bean class type

2013-01-10 Thread lb
Hi all, it looks like camel-bindy does not take into account the class specified in the method: bindy(BindyType.Csv, MyCamelBeans.TEST.class) I have class MyCamelBeans which includes several "bindies" among which I have a really simple MyCamelBeans.TEST: class MyCamelBeans { @Csv

Re: [camel-bindy] bindy ignore bean class type

2013-01-10 Thread Claus Ibsen
Hi Try moving your class outside, so its not inlined in another class. I would assume Bindy requires that. On Thu, Jan 10, 2013 at 2:58 PM, lb wrote: > Hi all, > it looks like camel-bindy does not take into account the class specified in > the method: > > bindy(BindyType.Csv, MyCamelBeans.TE

Re: Question about camel cxf & blueprint

2013-01-10 Thread Willem jiang
Hi Charles, You should be able to set up the outInterceptors and inInterceptors like this http://localhost:9090/training/WebService"; serviceClass="com.fusesource.training.CustomerService"> -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource

camel-mail regarding xml configuration

2013-01-10 Thread tamil13
How to configure below code into camel-context.xml file? template = context.createProducerTemplate(); ProducerTemplate template; Map map = new HashMap(); map.put("To", "davscl...@apache.org"); map.put("From", "jstrac...@apache.org"); map.put("Subject", "Camel rocks"); String body = "Hello Claus.\

Re: Question about camel cxf & blueprint

2013-01-10 Thread Charles Moulliard
Your are right. I just discover my mistake a few minutes ago. Thx On Thu, Jan 10, 2013 at 3:27 PM, Willem jiang wrote: > Hi Charles, > > You should be able to set up the outInterceptors and inInterceptors like > this > > address="http://localhost:9090/training/WebService"; > serviceClass="com.f

Re: recipientList with POST and request body

2013-01-10 Thread Zemin Hu
I added a line: template.start() before sending request, it did not help, got same exception. I changed to context.start() it did not work either. The code is within bean implementation, so context is build-in variable, and started already, why do I need to start it again? From other example code,

Re: recipientList with POST and request body

2013-01-10 Thread Willem jiang
You just need to start the ProducerTemplate, you don't need to start the camel context as it is already started. Can you check the camel log to see if there is any information shows what's the cause exception? -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.

Re: recipientList with POST and request body

2013-01-10 Thread Zemin Hu
I posted the exception before, let me copy the exception again: the exception is: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: {"id":["48792683442"],"index":"0"}] at org.apache.camel.util.ObjectHelper.wrapCamelExecutionExc

Re: camel-mail

2013-01-10 Thread tamil13
It is working now. Can we config below coding in camel-context.xml also? ProducerTemplate template; template = context.createProducerTemplate(); Map map = new HashMap(); map.put("To", "davscl...@apache.org"); map.put("From", "jstrac...@apache.org"); map.put("Subject", "Camel rocks"); String body

Re: recipientList with POST and request body

2013-01-10 Thread Willem jiang
I just recheck the code, the camel context is bind with the variable name of "camelContext". -- 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/) (Englis

Re: Question about camel cxf & blueprint

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 3:39 PM, Charles Moulliard wrote: > Your are right. I just discover my mistake a few minutes ago. Thx > Maybe we should add that to the camel-cxf docs as a little example how to enable logging when using cxf blueprint. > > On Thu, Jan 10, 2013 at 3:27 PM, Willem jiang w

Re: [camel-bindy] bindy ignore bean class type

2013-01-10 Thread lb
Hi, it works if the beans are in a different package not if they are in the same one -- View this message in context: http://camel.465427.n5.nabble.com/camel-bindy-bindy-ignore-bean-class-type-tp5725275p5725291.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-mail

2013-01-10 Thread Claus Ibsen
On Thu, Jan 10, 2013 at 3:53 PM, tamil13 wrote: > It is working now. Can we config below coding in camel-context.xml also? > What do you mean? The code below is not a Camel route (which you can configure in XML) but code that sends a message to a Camel endpoint using the producer template. And

Re: recipientList with POST and request body

2013-01-10 Thread Willem jiang
You should be able to get the cause Exception from the log. That is what I'm asking for. Can you check the log below the exception that you just showed? -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemji

Re: recipientList with POST and request body

2013-01-10 Thread Zemin Hu
Thanks. The camelContext is not causing exception anymore. The cause of the exception is: Caused by: org.apache.camel.component.http.HttpOperationFailedException: HTTP operation failed invoking https://locker.att.net/service/content/1/playlists/158040465976 with statusCode: 302, redirectLocation: h

Re: recipientList with POST and request body

2013-01-10 Thread Willem jiang
Hi, It looks like the URL you want to access need you to login first. Can you double check it? -- 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/) (En

Re: [camel-bindy] bindy ignore bean class type

2013-01-10 Thread lb
I think the problem is in BindyAbstractFactory.java : /** * method uses to initialize the model representing the classes who will * bind the data. This process will scan for classes according to the * package name provided, check the annotated classes and fields. * *

Premature end of file on return from HTTP endpoint

2013-01-10 Thread Castyn
I am submitting messages to an HTTP web service through camel. For some reason, when I am attempting to call an xpath expression on the result I am getting a org.xml.sax.SAXParseException: Premature end of file. Looking at the body of the SOAP XML that is being returned by the HTTP endpoint, I s

Re: recipientList with POST and request body

2013-01-10 Thread Zemin Hu
I think I understand now why I can't do this with producerTemplate: yes, there is intensive security checks for our web service site, at this point to use producerTemplate I already logged in and got session in previous steps in the same route, the problem is that the security token with session in

Re: Issue using camel-cxf and wss4j

2013-01-10 Thread Daniel Kulp
On Jan 10, 2013, at 4:37 AM, Charles Moulliard wrote: > I don't find info about this dataFormat (CXF_MESSAGE) in CXF. Does it exist > ? Yes it exists, but I'm really not exactly happy about how it works. I'd like to kind of "redo" it, but it would require a lot of internal CXF changes which

Re: Transactional aggregator

2013-01-10 Thread orz
Hi, Unfortunately, I need to go ahead with the Javabean approach. Now I have a processor that is a bit similar to org.apache.camel.processor.aggregate.AggregateProcessor. It has a aggregatorRepository to manage the in-flight exchanges. However, I need to catch the RollbackExchangeException in thi

Re: Output File Name After Exec

2013-01-10 Thread neilac333
Thanks for your responses. To answer the first question, here is the route I have so far: from("servlet:///my-endpoint") .to("exec:${shellScriptPath}?outFile=${outFilePath}") .convertBodyTo(String.class) .bean(new DataProvider()) .marshal(jsonDataF

Re: camel-mail regarding xml configuration

2013-01-10 Thread David Karlsen
Use setHeader or configure properties on the endpoint. Den 10. jan. 2013 15:38 skrev "tamil13" følgende: > How to configure below code into camel-context.xml file? > > template = context.createProducerTemplate(); > ProducerTemplate template; > Map map = new HashMap(); > map.put("To", "davscl...@a

Re: Output File Name After Exec

2013-01-10 Thread Andrea Tarocchi
Hi, outFile is an option that you use to instruct the exec component on which file is the output of the executed command; in other words the component first execs the command then grab the outFile specified and put it in the body; that said, assuming ${outFilePath} is a property correctly resolve

Re: Failing over in-flight exchanges

2013-01-10 Thread Christian Müller
Why you do not use ActiveMQ for this? Best, Christian Am 10.01.2013 09:56 schrieb "narita" : > > Component/Node Event Logging Feature - Where in hook a Processor after > every > component/node to log the message details (an efficient logging mechanism > can be in place File/DB/Mongo etc). This is

Jetty to ActiveMQ Failure

2013-01-10 Thread Alan Smithee
I am seeing the exception listed below after running a fairly straightforward load test against jetty/activemq/camel. As best as I can make out, it occurs only after I have run the test a few times (i.e. start,finish,start,finish,start,exception), at which time all connections in the test fail. One

Re: Failing over in-flight exchanges

2013-01-10 Thread Rakesh Sharma
Hi Ashwin, Narita, and Christian, Thanks for very valuable ideas. I was already considering few of the ideas you put forward. MOM fits in some use cases and it does not fit in many others. Also, I do not want to create dependence on another infrastructure if there are other ways of doing it. Also,

Re: What's the best way to resequence message

2013-01-10 Thread Willem jiang
Camel supports the resequence[1], you can consider to put a index in the message header before routing the message from the web service endpoint. [1]http://camel.apache.org/resequencer.html -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http

Re: camel-mail regarding xml configuration

2013-01-10 Thread tamil13
I tried. but dont know how to do it. Could any one post respective xml code for sending mail? -- View this message in context: http://camel.465427.n5.nabble.com/camel-mail-regarding-xml-configuration-tp5725280p5725346.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: CamelExecutionException is caught but stack trace still dumped on screen

2013-01-10 Thread Claus Ibsen
Hi You can customize the error handler to not log exceptions http://camel.apache.org/error-handler.html There is some options on the default error handler etc to do that. On Fri, Jan 11, 2013 at 8:52 AM, demetrios wrote: > Hi All > Using camel 2.10.3. > During the execution of my program I am