Questions tagged [camel-http]

Apache Camel is an open source Java framework. Questions involving one of its components - camel-http - may have this tag.

68 questions
9
votes
1 answer

How to get the response status code after a camel http call

Hi I am quite new to Camel. I a executing a https4 call from camel route. I want to get the status code for the response. Where can I get this from?
Susanna Michael
  • 141
  • 1
  • 3
  • 11
9
votes
4 answers

Send POST Request using Apache Camel

I was able to send a GET request using Apache Camel to a REST service and now I'm trying to send a POST request with a JSON body using Apache Camel. I wasn't able to figure out how to add the JSON body and send the request. How can I add a JSON…
user6641655
  • 523
  • 2
  • 8
  • 13
4
votes
3 answers

using camel http handling CachedOutputStream

hi~ i am using camel http component. and i can't extract body message. here is my code .log(LoggingLevel.INFO, "ToUri ===> ${body}") .toD("${body}") .log(LoggingLevel.INFO, "Result ===> ${body}") .process(new Processor() { public void…
james
  • 235
  • 2
  • 5
  • 11
3
votes
1 answer

Camel HTTPComponent Options vs HTTPEndpoint Options

To use Camel HTTP4 component - in the documentation, there are options for both HTTP component and and HTTPEndpoint. I understand the difference between endpoint and component (component is a factory for endpoints), but here there are options for…
SRaj
  • 1,168
  • 1
  • 14
  • 36
3
votes
1 answer

Camel routes from activemq to rest endpoint

I am trying to use Spring Boot 1.5.2.RELEASE + Camel (Spring Boot starter) 2.19.2 to listen to ActiveMQ queue and then post the message to a rest endpoint URL (POST method) as its body. What would be the best possible way to achieve this? I have…
Sayantan
  • 564
  • 2
  • 7
  • 23
2
votes
1 answer

HttpOperationFailedException deprecatted but still used in Camel 3

I have a route that calls the HTTP component in Camel 3.3. This is working fine and I am trying to catch the HttpOperationFailedException which is being thrown. I have declared the following error handler in my camel route:
Namphibian
  • 12,046
  • 7
  • 46
  • 76
2
votes
1 answer

How to check that a key exists with jsonpath in a Camel route?

This JSON object below needs to be checked if a key exists or not. If key exists and value is empty then I want set TH as default language. How to do that in camel route? { "languagePreference":"" } //set default value of language preference as…
Aadi
  • 1,131
  • 2
  • 16
  • 32
2
votes
2 answers

Global configuration of http proxy in camel

So far, I have learned to ways to set HTTP proxy with camel. First one is to append proxy information with destination URI Other approach is setting proxy global to…
niyasc
  • 4,440
  • 1
  • 23
  • 50
1
vote
1 answer

How to connect a Camel route to a REST Service to receive an event-stream

Within a Camel route I need to connect to a service with a HTTP GET request and leave the connection open to receive events. The Camel connection never receives events from the service. I can use Postman to perform this operation…
amccarron
  • 9
  • 3
1
vote
0 answers

Apache Camel Http Component - OutOfMemoryError

I am facing out of memory error on using the Apache camel Http component to download/stream a file from a public link to an external system (SharePoint). It seems the component internally is reading all of the files into memory at once. Can we do…
Jawad Ahmad
  • 124
  • 1
  • 8
1
vote
0 answers

Print unmarshalled MIME request parts using Camel routes (XML)

I am working with Camel Routes (XML) to process a MIME request that contains attachments. I have successfully unmarshalled the request using . However, when I log the body of the unmarshalled request, it only shows the content of the first…
1
vote
0 answers

Camel: Calling a HTTPS REST endpoint with a proxy

I'm consuming data from a REST endpoint with in the middle of the route a proxy. I'm having CNTLM running locally (localhost:3128 ): it will authenticate for me on the corporate proxy, so I don't need to pass my credentials. I have been unable to…
Hey StackExchange
  • 2,057
  • 3
  • 19
  • 35
1
vote
1 answer

How to send REST requests with parameters in Apache Camel

I am curious how I can manage the HTTP REST requests in Apache Camel? I need to iterate through the list of IDs and place the particular ID from the list in HTTP GET request. This list I would receive from a database. I need to send request to third…
1
vote
0 answers

Getting HTTP 401 Error when using Camel-http4 with proxy and sslcontext

I have existing connection using http4(proxyAuthScheme=http4 and endpoint starts with https://<>) and using proxy and using sslContextParametersRef. it was working fine before. now we have upgraded our new proxy with new proxy and i am started…
1
vote
2 answers

Unable to process large files in camel using http4

A scenario, need to consume a rest webservice which provides a huge file as a stream output and vice versa need to handle the stream and directly write to a file rather memory. Service : @RequestMapping(value = "downloadFile", method =…
1
2 3 4 5