Re: Customize the Http Response Code for REST Service

2016-03-24 Thread Claus Ibsen
Set a header with the response code you want. Exchange.CONTENT_TYPE is the key of the header. On Fri, Mar 25, 2016 at 5:52 AM, urwithsumit wrote: > Hi, > > I am developing a REST service using apache Camel REST DSL. > In the service if the request validation fail or any

Customize the Http Response Code for REST Service

2016-03-24 Thread urwithsumit
Hi, I am developing a REST service using apache Camel REST DSL. In the service if the request validation fail or any excepted failure happens than I send back a response message with the Custom Error Code. In this scenario the HTTP Response Code that gets returned is 200Ok. I want to Change the

Re: [CAMEL-CDI] What's is the CDI scope for the RouteBuilder?

2016-03-24 Thread Charlee Chitsuk
John, Thank you very much for your advise. It is a good resource. -- Best Regards, Charlee Ch. 2016-03-25 8:43 GMT+07:00 John D. Ament : > Charlee, > > One thing to point out. If you find that you're adding a lot of routes > based on the same format, you may want

Re: [CAMEL-CDI] What's is the CDI scope for the RouteBuilder?

2016-03-24 Thread John D. Ament
Charlee, One thing to point out. If you find that you're adding a lot of routes based on the same format, you may want to use dynamic URIs instead. http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html John On Thu, Mar 24, 2016 at 9:26 PM Charlee Chitsuk wrote: >

Re: [CAMEL-CDI] What's is the CDI scope for the RouteBuilder?

2016-03-24 Thread Charlee Chitsuk
Hi Antonin and John, As you have mentioned, both of RouteBuilder readability and using the Camel CDI capability for looking up them automatically is valuable. I've to think twice if it is worth to re-factor or not. Thank you very much for your advise. -- Best Regards, Charlee Ch.

Re: camel-maven-plugin executable jar, MANIFEST entry is missing

2016-03-24 Thread fabrizio.spataro
ok when 2.16.3 is released? :-) -- View this message in context: http://camel.465427.n5.nabble.com/camel-maven-plugin-executable-jar-MANIFEST-entry-is-missing-tp5779625p5779663.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-maven-plugin executable jar, MANIFEST entry is missing

2016-03-24 Thread Claus Ibsen
If you build a fat JAR yourself then make sure to provide correct main class it should call. If you want to call a main from camel then make sure camel-spring etc is included in your fatjar. It looks like you build your fat jar wrong. Search the internet how to build fat jars with maven. On

Re: camel-maven-plugin executable jar, MANIFEST entry is missing

2016-03-24 Thread fabrizio.spataro
Yes!!! I am using pom same pom.xml with all camel dependencies for my project!!!... If i change camel version from 2.16.2 to 2.16.3-SNAPSHOT maven jar plugin failure! -- View this message in context:

Re: camel-maven-plugin executable jar, MANIFEST entry is missing

2016-03-24 Thread Claus Ibsen
Make sure to build 2.16.3-SNAPSHOT locally yourself. The SNAPSHOT on the maven repo is out dated and "half builds" and whatnot. Do not use that. Always build from source yourself. On Thu, Mar 24, 2016 at 3:35 PM, fabrizio.spataro wrote: > Yes!!! > > I am using pom

Re: camel-maven-plugin executable jar, MANIFEST entry is missing

2016-03-24 Thread Claus Ibsen
But do you have camel-spring as dependency in your pom.xml. eg do you use Spring at all? On Thu, Mar 24, 2016 at 3:14 PM, fabrizio.spataro wrote: > Hello Claus, > > I cannot insert camel-spring manually because it is a maven plugin work! > > I repeat this concept:

Junit camel with spring boot

2016-03-24 Thread deelip
I have exposed userservice in Spring Rest service using spring boot and in that calling userDataWebService using camel cxf component. in junit skipping cxf endpoing and invoke process to return response then it is giving null in "mock:result" but if I throw exception then it comes to

Re: camel-maven-plugin executable jar, MANIFEST entry is missing

2016-03-24 Thread fabrizio.spataro
Hello Claus, I cannot insert camel-spring manually because it is a maven plugin work! I repeat this concept: with camel 2.16.2 it is all ok!!! Is it a bug of 2.16.3 version? According follow source code, maven jar plugin is able to do it: org.apache.maven.plugins maven-jar-plugin

Automatic Type Conversion of FIX Messages working as expected?

2016-03-24 Thread Gershaw, Geoffrey A.
Hello All, I am using camel 2.16.x. I wrote a quickfixj server, an acceptor in quickfixj terms. I receive a message from quickfij, use a filter to determine the message is a BusinessMessageReject and call the below method public void handleReject(final BusinessMessageReject rejectMsg) I get

Re: [CAMEL-CDI] What's is the CDI scope for the RouteBuilder?

2016-03-24 Thread Antonin Stefanutti
> On 24 Mar 2016, at 12:47, Charlee Chitsuk wrote: > > My project is based on CDI and Camel-CDI. I've tried to reduce the some of > "similar" RouteBuilder concrete classes by making it to receive the > different parameter, e.g source and destination. I'm not sure if >

Re: [CAMEL-CDI] What's is the CDI scope for the RouteBuilder?

2016-03-24 Thread Charlee Chitsuk
My project is based on CDI and Camel-CDI. I've tried to reduce the some of "similar" RouteBuilder concrete classes by making it to receive the different parameter, e.g source and destination. I'm not sure if registering manually is a suitable way or not. -- Best Regards, Charlee Chitsuk

Re: [CAMEL-CDI] What's is the CDI scope for the RouteBuilder?

2016-03-24 Thread John D. Ament
On Thu, Mar 24, 2016 at 7:29 AM Charlee Chitsuk wrote: > Hi Antonin, > > Thank you very much. This answer my question. > > Please correct me if I'm wrong. Since it is a @Dependent, I can register > the new instance (with different route-id and parameters) to the context as

Re: [CAMEL-CDI] What's is the CDI scope for the RouteBuilder?

2016-03-24 Thread Charlee Chitsuk
Hi Antonin, Thank you very much. This answer my question. Please correct me if I'm wrong. Since it is a @Dependent, I can register the new instance (with different route-id and parameters) to the context as much as possible. Cloud you please help to advise further? -- Best Regards,

Re: Internal exception thrown for each call to producerTemplate.sendBodyAndHeaders

2016-03-24 Thread Martin Lichtin
Camel 2.15.5 The exception doesn't bubble to the top, Camel catches and handles this internally. I see it in the Exception report using Java flight recorder. Examples of used urls would be jms:queue:myQ.msgout or jms:queue:my_Q.msgout or jms:queue:a.b.c.d8101.e Claus Ibsen-2 wrote > What

Re: Internal exception thrown for each call to producerTemplate.sendBodyAndHeaders

2016-03-24 Thread Claus Ibsen
What version of Camel do you use. And what is the real stacktrace printed And what is the *actual* url you call. As that plain string should be parsable. On Thu, Mar 24, 2016 at 10:39 AM, Martin Lichtin wrote: > When using a producer template to send messages to a

Re: one route how to call another route?

2016-03-24 Thread Claus Ibsen
Use the content enricher EIP to pickup the file from your servlet route http://camel.apache.org/content-enricher.html Use the pollEnrich for consuming the file. To call other routes, use the direct component and link them together. But in your use-case the correct solution is pollEnrich. Or

Internal exception thrown for each call to producerTemplate.sendBodyAndHeaders

2016-03-24 Thread Martin Lichtin
When using a producer template to send messages to a JMS queue, such as producerTemplate.sendBodyAndHeaders("jms:queue:myQ", body, headers); we see how this internally always creates an exception: java.lang.Throwable.(String) line: 267 java.lang.Exception.(String) line: 52

one route how to call another route?

2016-03-24 Thread dnvycumt
Hi, from a web service, I want to return some file content to response: http://0.0.0.0:9081"/> -- View this message in context: http://camel.465427.n5.nabble.com/one-route-how-to-call-another-route-tp5779618.html Sent from the Camel - Users

Re: camel-maven-plugin executable jar, MANIFEST entry is missing

2016-03-24 Thread Claus Ibsen
You need to add camel-spring to your classpath On Thu, Mar 24, 2016 at 10:58 AM, fabrizio.spataro wrote: > Hello, > > i am using camel-maven-plugin with camel version 2.16.3-SNAPSHOT, but my > executable jar don't have enough MANIFEST 's entries (for example >

camel-maven-plugin executable jar, MANIFEST entry is missing

2016-03-24 Thread fabrizio.spataro
Hello, i am using camel-maven-plugin with camel version 2.16.3-SNAPSHOT, but my executable jar don't have enough MANIFEST 's entries (for example camel-spring is missing!!) With camel 2.16.2 it is all ok! It's a bug? Output: $ java -jar myFantasticCamelApplication.jar Exception in thread

Re: [CAMEL-CDI] What's is the CDI scope for the RouteBuilder?

2016-03-24 Thread Antonin Stefanutti
Hi Charlee, There is actually no constraint on the scope to declare for the RouteBuilder beans that are discovered by Camel CDI. Camel CDI just gets one instance for each of them at start time and adds this to the Camel context. So that will equally work whether a RouteBuilder is @Dependent

Re: security requirement using swagger java

2016-03-24 Thread Tim Dudgeon
Done: https://issues.apache.org/jira/browse/CAMEL-9751 On 24/03/2016 07:51, Claus Ibsen wrote: Hi No its not included currently. You are welcome to log a JIRA about this so we can add it in a future release http://camel.apache.org/support.html On Wed, Mar 23, 2016 at 9:59 PM, Tim Dudgeon

Re: Quartz schedule too many workers in route

2016-03-24 Thread Claus Ibsen
Hi Have not had time to look into this. You are welcome to log a JIRA so we can improve this in a future release http://camel.apache.org/support.html On Wed, Mar 23, 2016 at 5:33 PM, Hans Orbaan wrote: > Hi, > > The only way I have found to make sure a file or ftp

Re: security requirement using swagger java

2016-03-24 Thread Claus Ibsen
Hi No its not included currently. You are welcome to log a JIRA about this so we can add it in a future release http://camel.apache.org/support.html On Wed, Mar 23, 2016 at 9:59 PM, Tim Dudgeon wrote: > Hi > Is it possible to specify swagger security requirements >