Re: Consuming data from external REST service

2017-03-01 Thread Tomohisa Igarashi
Hi, How did you send a message to the "direct:getRestExternalService" endpoint? from() just means it consumes from that URL, so the route won't be executed until a message is sent to that endpoint. Thanks, Tomo On 02/28/2017 02:59 AM, rkmohapatra wrote: Thank you Ravi for the tips. I did thi

Re: Consuming data from external REST service

2017-03-01 Thread rkmohapatra
Hi Tomo, I basically wanted to call the REST API to consume data. I think as you pointed out, 'direct:getRestExternalService' does not get message from anywhere. But when I change the code as below, I get the following exception. from("http4://...") .process(new RestProcessor()); 'Caused by: o

Re: Consuming data from external REST service

2017-03-01 Thread souciance
http4 cannot be used as a consumer. You can only use it to send http requests not receive. You need netty-http4 or some other component that can also receive. Http4 is more like a client. But you can just use a file component which is build it and send some dummy data if you want to test. Or creat

Re: Consuming data from external REST service

2017-03-01 Thread rkmohapatra
Hi Souciance, Thanks for help. I tried using Netty4-http with below code. from("file:d:\\testcamel").convertBodyTo(String.class) .setHeader(Exchange.HTTP_PATH, constant("/api/xyz")) .setHeader(Exchange.HTTP_QUERY, constant("q=xyz")) .to("netty4-http

How to override Buffer size for httpclient when calling Rest web Service via Camel

2017-03-01 Thread Tarun.Bharti
When i send a rest Get request via camel its restricting the request URI size to 2048 byte where i need to send a URI of 5000 byte. I debugged and found camel is internally using Apache HTTPClient to send the send the request. Is there any way to change the BufferedOutPutStream size of HTTPConnecti

Re: Consuming data from external REST service

2017-03-01 Thread rkmohapatra
Hi Souciance and all, With this code, it worked this time with http4. Used ExchangePattern.InOut. from("file:d:\\testcamel").convertBodyTo(String.class) .setExchangePattern(ExchangePattern.InOut) .setHeader(Exchange.HTTP_PATH, constant("/path")) .se

Re: How to override Buffer size for httpclient when calling Rest web Service via Camel

2017-03-01 Thread Claus Ibsen
Can you tell more which CAmel version, which http / rest components you use etc. On Wed, Mar 1, 2017 at 2:05 PM, Tarun.Bharti wrote: > When i send a rest Get request via camel its restricting the request URI size > to 2048 byte where i need to send a URI of 5000 byte. I debugged and found > camel

Re: Consuming data from external REST service

2017-03-01 Thread souciance
You don't need to set the pattern to InOut. InOnly which is the default is enough for this case. You can use http4 to do http requests. If you want to receive http use jetty, netty or some other http component. It is stated in the documentation. On Wed, Mar 1, 2017 at 2:36 PM, rkmohapatra [via Cam

Re: How to override Buffer size for httpclient when calling Rest web Service via Camel

2017-03-01 Thread ankurkumar78
I'm part of the same team. Apache Camel Version is 2.13.1 I think we are looking for configuring HttpClient Buffer Size in this case through Camel -- View this message in context: http://camel.465427.n5.nabble.com/How-to-override-Buffer-size-for-httpclient-when-calling-Rest-web-Service-via-Cam

Re: Consuming data from external REST service

2017-03-01 Thread rkmohapatra
Ok, understood. Trying with Netty4 as well. But need to resolve this issue. java.util.NoSuchElementException: Could not create a validated object, cause: ValidateObject failed at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1233) ~[commons-pool-1.6.ja