CXFRS vs New Rest DSL

2016-08-31 Thread Kasim Sert (Ibtech-Software Infrastructure)
Hi, As company we have many soap and rest services and we want to rewrite our framework and move these services to camel-cxf. I like the idea of having one interface definition and being able to expose it as soap and rest at the same time, I think we can do this with cxfrs. However as far as I s

Re: http 415 error in cxf rest service

2016-08-31 Thread cacert
hi, as you said i could be able to solve this by defining a json provider.thank you. -- View this message in context: http://camel.465427.n5.nabble.com/http-415-error-in-cxf-rest-service-tp5786955p5787009.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: ERROR No message body reader has been found for class, ContentType: application/json' in CXF JAXRS - 2.17.3

2016-08-31 Thread cacert
Hi, As far as I understand this is because of there is no default json provider for jaxrs in cxf. (for xml messages there is jaxb as default) I could be able to solve this issue by defining a provider for json, and giving this definition on my rest endpoint. in maven:

Re: Camel BeanIODataFormat Configure ErrorHandler for BeanIO Reader

2016-08-31 Thread spurcell
I tested some bad files yesterday, and the problems is really when a user l= eaves out a field, then the Runtime gets caught, but we get a ambigious err= or such as : Array out of bounds, no row, no column, etc. That is why we we= re hoping to try grabbing an instance of the ErrorHandler which appe

Re: Camel BeanIODataFormat Configure ErrorHandler for BeanIO Reader

2016-08-31 Thread spurcell
Hello Brad, We have a large project in which we are taking in large csv files. Our team wants to create a custom BeanReaderErrorHandler (from: http://camel.apache.org/beanio.html) so we could convert errors to our return errors and build return files for our customers in our newly created applicat

Re: Camel BeanIODataFormat Configure ErrorHandler for BeanIO Reader

2016-08-31 Thread Claus Ibsen
A good idea is to look at the unit tests of camel-beanio and how it tests this functionality. On Tue, Aug 30, 2016 at 10:35 PM, spurcell wrote: > Hello Brad, > > We have a large project in which we are taking in large csv files. Our team > wants to create a custom BeanReaderErrorHandler (from: >

Re: First time create SFTP File and then Append to same in loop.

2016-08-31 Thread Claus Ibsen
Can you not just use fileExists=Append always so the data is always appended if the file exists? On Wed, Aug 31, 2016 at 2:46 AM, Goyal, Arpit wrote: > Hi Colleagues, > > We have the following route: > > from("xxx:inbound").process(new > MyProcessor()).choice(when(header("record_count").isGreat

Re: when to call start() and stop() on ProducerTemplate?

2016-08-31 Thread Claus Ibsen
Yes that is fine to only call stop on server shutdown. Then you can reuse the same producer template. Only if you do not use the template anymore you can call stop before. On Wed, Aug 31, 2016 at 8:33 AM, atluris wrote: > Hi, > > Based on below article, we are creating single producer template

Re: ERROR No message body reader has been found for class, ContentType: application/json' in CXF JAXRS - 2.17.3

2016-08-31 Thread Sergey Beryozkin
On 31/08/16 06:56, imranrazakhan wrote: @sergery/ranx, addition of jettision didn't resolve problem. Default CXF JSONProvider is JAXB based but is optional, it is available in cxf-rt-rs-extensions-providers (alongside some other optional providers). @cacert, Thanks, Your suggestion worked

Re: CXFRS vs New Rest DSL

2016-08-31 Thread Sergey Beryozkin
Unfortunately I haven't finished yet my project for converting CXFRS to work with REST DSL (I'm committed to it but finding it very hard to find the time to get it finished - the initial code is already available but requires a good bit of polishing). REST DSL works on top of different impleme

Pulling multiple files in simultaneously

2016-08-31 Thread kikou1984
Hi, Here an example for writing files Using Apache Camel FrameWork in a specific folder. http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/sc

CXFRS swagger integration

2016-08-31 Thread Kasim Sert (Ibtech-Software Infrastructure)
Hi, I have defined cxfrs route and its working fine. However when I integrate swagger2feature of cxf I can not see api docs. When i hit swagger.json path to get swagger response the request again hits my route which produces wrong response. I think requests for swagger api should not hit my rou

Camel send/receive UDP with Netty4

2016-08-31 Thread Steve973
Hello, All. I am trying to create an example where I can receive UDP packets with the Netty4 component, but it isn't working. I'm sending UDP packets with a DatagramSocket to localhost, and I have a camel route consuming from netty4:udp//localhost on the port the DatagramSocket sent to. Here's t

RE: Camel send/receive UDP with Netty4

2016-08-31 Thread Steve Huston
I'm not an expert on the camel you show, but try changing: from(String.format("netty4:udp://localhost:%d?sync=false&textline=true", to from(String.format("netty4:udp://0.0.0.0:%d?sync=false&textline=true", > -Original Message- > From: Steve973 [mailto:steve...@gmail.com] > Sent: Wednesda

Re: Camel send/receive UDP with Netty4

2016-08-31 Thread Steve973
Thanks. That may have helped, and I definitely used it, but I also had to use a StringDecoder implementation, and now it works. On Wed, Aug 31, 2016 at 10:32 AM, Steve Huston wrote: > I'm not an expert on the camel you show, but try changing: > from(String.format("netty4:udp://localhost:%d?syn

Re: CXFRS vs New Rest DSL

2016-08-31 Thread Matt Sicker
I like using the REST DSL over CXF because there's a lot less boilerplate, and I don't need to expose a SOAP service or anything overly complicated that CXF supports. For simple REST API use cases, the REST DSL is great when your API makes heavy use of Camel routes. On 31 August 2016 at 04:01, Ser

Re: Camel BeanIODataFormat Configure ErrorHandler for BeanIO Reader

2016-08-31 Thread spurcell
GM Claus-Ibsen-2, Thanks for the response ... really appreciated that angle. It looks like that functionality was just added to MASTER (trunk I assume). We are running on Camel 2.16.1, and the camel-bean docs show this capability in 2.10, so we were struggling yesterday to understand. As we see

2.18-SNAPSHOT download assistance

2016-08-31 Thread spurcell
Hello, Our team would like to pre-test the 2.18-SNAPSHOT to see if some functionality will work for us. I use MVN, which means I put a version into my pom and pull it. But it looks like I can only pull releases. Is there a way I can pull the -SNAPSHOT to test? If maven doesn't support it, I guess

Re: Camel send/receive UDP with Netty4

2016-08-31 Thread Claus Ibsen
There is a fromF and toF which has built-in String.format which can makes the DSL a bit nicer to read. On Wed, Aug 31, 2016 at 4:32 PM, Steve Huston wrote: > I'm not an expert on the camel you show, but try changing: > from(String.format("netty4:udp://localhost:%d?sync=false&textline=true", > > t

Re: Camel BeanIODataFormat Configure ErrorHandler for BeanIO Reader

2016-08-31 Thread Claus Ibsen
Camel 2.18.0 is expected to be released in september 2016. You can build or use SNAPSHOT to try latest code http://camel.apache.org/maven-2-snapshot-repository-in-pom.html http://camel.apache.org/building.html On Wed, Aug 31, 2016 at 4:11 PM, spurcell wrote: > GM Claus-Ibsen-2, > > Thanks for th

Re: CXFRS vs New Rest DSL

2016-08-31 Thread Brad Johnson
Personally I prefer CXF and generally expose Rest and SOAP via annotations on the same interface. I then use a RecipientList to route the operationName of the method invoked to the same place. That way I get both SOAP and Rest without any extra work. But let me temper that statement by saying th

Re: 2.18-SNAPSHOT download assistance

2016-08-31 Thread Claus Ibsen
We just switched to use a zero digit in the SNAPSHOT version so it should be 2.18.0-SNAPSHOT http://camel.apache.org/maven-2-snapshot-repository-in-pom.html On Wed, Aug 31, 2016 at 4:42 PM, spurcell wrote: > Hello, > > Our team would like to pre-test the 2.18-SNAPSHOT to see if some > functional

Re: CXFRS swagger integration

2016-08-31 Thread Sergey Beryozkin
Try Swagger2Feature 'runAsFilter' property Sergey On 31/08/16 12:23, Kasim Sert (Ibtech-Software Infrastructure) wrote: Hi, I have defined cxfrs route and its working fine. However when I integrate swagger2feature of cxf I can not see api docs. When i hit swagger.json path to get swagger resp

Re: Camel BeanIODataFormat Configure ErrorHandler for BeanIO Reader

2016-08-31 Thread Brad Johnson
This would indicate that you have a record in the file that is unexpected. While an error handler could help with that you can tell it to ignore records with certain characteristics or if there's a couple of header and footer lines just add getter/setters for them along with the mappying (or, if yo

Re: Camel BeanIODataFormat Configure ErrorHandler for BeanIO Reader

2016-08-31 Thread Brad Johnson
Can you put a few lines of an example of your files up here. Just a few lines and you can modify the data to obscure anything about the company or data that you don't want known. Unexpected record 'fileHeaderRecord' at line 2 java.lang.IndexOutOfBoundsException: Index: 3, Size: 3 Unexpected reco

RE: First time create SFTP File and then Append to same in loop.

2016-08-31 Thread Goyal, Arpit
Hi Clause, The problem is -- First time execution creates the file and in loop appends the data. Now the process ends and file is available at SFTP folder. Second time execution, it will again append resulting to business logic failure, as file should be created fresh - and user might give FIXE

Re: ERROR No message body reader has been found for class, ContentType: application/json' in CXF JAXRS - 2.17.3

2016-08-31 Thread Brad Johnson
Glad that you got it straightened out! I've used Jackson and it worked well. I don't recall having problems with Jettison but what the heck. Unless I have a compelling need I usually just stick with the JAXB provider. Brad On Wed, Aug 31, 2016 at 3:56 AM, Sergey Beryozkin wrote: > On 31/08/1

Split EIP not using defined thread pool size

2016-08-31 Thread Hubertus.Willuhn
Hi, i have a route definition like: from("file:/dir") .split() .tokenizeXML("element", "root").streaming() .parallelProcessing().threads(10, 15) .process(...) .to("mock:out") .end() I assume that this would result in a XML splitting with up to 15 threads and minimum