68 questions
0
votes
1
answer
70
views
Upload file to strapi with apache camel as multipart/form-data
The strapi rest API requires a multipart/form-data upload, were the uploaded files require a key (files). As documented here. I am struggling to create an equivalent to the JavaScript FormData object. ...
0
votes
1
answer
140
views
Call NTLM secured endpoint via Apache Camel
I am creating the following route, which uses NTLM authentication, but 401 is always returned and with the following error
from("direct:start")
.setHeader(Exchange.HTTP_METHOD, () -> &...
1
vote
1
answer
401
views
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 ...
1
vote
0
answers
221
views
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 ...
1
vote
0
answers
128
views
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, ...
0
votes
1
answer
274
views
Unable to convert exchange body to Custom Object
I am trying to covert jwt token to Object to get access token using spring DSL
<to uri="ref:oauthTokenEndpoint" />
<log message="Auth Token Response is ${body} " ...
0
votes
0
answers
364
views
How to prevent selected Camel headers being mapped onto HTTP headers
I want to enrich a Camel exchange with content fetched from some external web service. However, when calling that service, I do not want all the headers on my incoming exchange to be mapped onto HTTP ...
1
vote
0
answers
606
views
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 ...
0
votes
1
answer
713
views
Why is my Camel http response body empty despite stream caching?
I have a JPA consumer route which makes a POST and enriches the original Exchange:
@Component
public class GetDocumentPlaceholderRoute extends LateDeadLetterRoute {
private static final ...
1
vote
1
answer
3k
views
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 ...
0
votes
1
answer
480
views
Apache Camel HTTP4 component ignores Date: Header
I'm using Apache Camel's HTTP 4 component for performing a HTTP-PUT request. Before sending the request, I set custom and application dependent headers. One of the header key is 'Date'.
But ...
0
votes
0
answers
916
views
How to configure TLSv1.2 on Camel's http component to call an external service?
Below is the configured route I am using, to call an external service.
services_routes.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3....
0
votes
0
answers
217
views
Problem consuming api rest with camel-http4
I'm trying to consume the following url:
.to("https4://www.example.com/demo?execute&bridgeEndpoint=true")
but apparently the request comes out like this:
.to("https4://www.example....
0
votes
1
answer
1k
views
Apache Camel: Unit testing for file and http components
I am fairly new to Camel & just managed to implement a use case as below with 2 routes which is using file & http components. Looking for some leads on writing junits for the same. Have tried ...
0
votes
0
answers
726
views
Apache Camel: GET service call using toD() results in infinite loop
I want to read file(s) from a location, extract the fileName & make a rest call (GET) with the fileName as a request parameter. The file name is required to be passed dynamically as each file will ...
2
votes
0
answers
4k
views
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 ...
0
votes
2
answers
3k
views
How to set path variables in camel-http4
I have a camel-spring-boot project where I load the destination url from a yml file with Spring's @ConfigurationProperties. As my destination is a HTTP url I am using camel-http4 component.
Now my ...
1
vote
0
answers
245
views
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 ...
1
vote
2
answers
1k
views
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 :
@...
0
votes
0
answers
154
views
Best way to unmashal an object to a POJO in Apache Camel
I am trying to retrieve an object out of the process method in Camel response.
However once I got an empty response in the following code:
from("timer://simpleTimer?repeatCount=1").routeId("myroute")...
0
votes
0
answers
392
views
Log messages not printed in Camel route
I made an instance of Camel Context and added the routes in the context as follows:
camelContext.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
...
0
votes
1
answer
543
views
Produce messages to IBM MQ using REST API. Apache Camel
I have to send messages to IBM MQ by hitting a rest service. Below is the code I came up with, using Camel XML DSL.
<rest path="/basePath">
<post uri="/path" consumes="application/xml" ...
0
votes
0
answers
60
views
APACHE CAMEL REST DSL API behave differently from relative CURL operation
i'm stuck in something that is going me crazy.
I'm creating an application which exposes some APIs and map each of these API to some external API, so basically my app is a passtrough. The operation ...
0
votes
0
answers
5k
views
org.apache.camel.InvalidPayloadException: No body available of type: java.io.InputStream but has value: throw while unmarshalling the bindy bean
I'm trying to make a api call and get payload and enrich the content after unmarshalling the bean object. I can see that unmarshalling the bindy object has been happened but, it is throwing the below ...
0
votes
2
answers
713
views
How do I add only the parameter value to the endpoint in camel?
<camel:from id="_from2" uri="timer://foo?repeatCount=1"/>
<camel:to id="_to2" uri="DBSQLComponent:{{sql.testQuery}}"/>
<log id="_log4" message="Received ${body....
1
vote
1
answer
390
views
How to merge two xml tags into one xml using apache camel bindy
My problem is I have two different positions in my flat file with "|" seperated string. Position 2 and 3 refer to description. I want to generate xml with both descriptions appended to one description ...
0
votes
1
answer
677
views
How to make GET api call based on content of body using apache camel
My requirement is to make GET api call based on the content of the body I spitted from flat file.And aggregate the api response with original body and generate xml.
Input:
0150519821|0000000078|...
2
votes
1
answer
3k
views
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&...
0
votes
2
answers
2k
views
Is HttpOperationFailedException available with apache's http4?
I'm using apache camel http4 for http server.
JBoss Fuse Karaf container 6.3.0.redhat-310
has bundled camel-core 2.17 - (2.17.0.redhat-630310)
I'm trying to use exception class
org.apache.camel....
0
votes
0
answers
544
views
Apache Camel restConfiguration, choice and jsonpath
Camel endpoint with choice and jsonpath works correctly when tried as an independent endpoint but when I introduce rest endpoint in route configuration choice stops filtering for the content-based ...
1
vote
0
answers
1k
views
CamelHttp multipart/form-data upload. Changes between camel-http4 and camel-http-starter
I have a Spring Boot app that uses Camel to POST a multipart/form-data request to a REST endpoint. The request includes a text part and a file part. The code that builds the request is as follows:
@...
1
vote
1
answer
2k
views
Apache Camel: How to download multiple files from SFTP with Premove, Move and MoveFailed options?
I have two file names in following format:
Gontagrator_1.xml
Gontagrator_2.xml
As of now i am picking just Gontagrater_1.xml and rename it to processing and failed once done.
+ "&fileName=" + ...
1
vote
1
answer
652
views
Restlet error: 'Unable to run the following server-side task: sun.net.httpserver.ServerImpl$Exchange@56d26222'
I want to start my route by calling an URL. My start-route isn't ready yet, but works perfectly fine. My problem is, that i get an error message when i am using the rest-route, which calls the start-...
0
votes
0
answers
1k
views
Camel - HTTP request content based redirecting
I 'm trying to use camel for redirecting an http request based on the contents of the request body.
I 've created an endpoint for receiving http requests and I 'm able to successfully redirect my ...
0
votes
1
answer
491
views
How to get the message back to the queue if the http request failed?
I use apache camel with activemq and camel-http, after the message is sent to the endpoint and the request fails, I still lose the message from the queue.
It is necessary that the message is not lost ...
0
votes
1
answer
785
views
How to create routes configuration itself dynamically
In one of my use case, i have all my route information in a json file and i want to read the file and create the routes accordingly.
for example,
if i have declared route like this in my json config ...
0
votes
1
answer
847
views
Configure http4 certificate in application.yml
I'm trying to move my http4 certificate configuration away from RouteBuilder class and to application.yml file. My code is exactly like the Java example on this page under the "Setting up SSL for HTTP ...
0
votes
1
answer
1k
views
Camel rest - Allow specific ip to access send request
I have below camel rest route. Currently all the host is able to access this route using the URL exposed.
Is there anyway I can restrict remote host to access based on the IP configured.
I want to ...
1
vote
0
answers
614
views
Apache Camel Reactive REST content type
I using camel reactive streams and I would like to add content type APPLICATION_JSON_UTF8_VALUE for the response. I tried to add it in map function. Here is my code.
@Autowired
private ...
0
votes
1
answer
572
views
HttpConnectionManagerParams not working for HTTPS URL
We use Apache Camel's camel-http component to integrate with HTTP endpoints, HttpConnectionManagerParams is used to configure defaultconnectionsPerHost and maxTotalConnections.
<bean class="org....
2
votes
0
answers
2k
views
Apache Camel: Threads still running after Graceful shutdown
In our project we are have a camel (2.23.1) context and in certain situations we would like to terminate the context and all it routes immediately. For this we have the following code:
private void ...
0
votes
1
answer
417
views
Camel Java DSL: Update the next polling request param using the value from the response
I am new to Apache camel, this is what I am trying to figure out. In a sample code below, I am trying to use the property - "value" in the request param in next polling request.
String ...
1
vote
1
answer
1k
views
camel proxy configuration camel-https4
We have to connect out java camel application with an external system over https. In the middle we have a proxy, but this proxy only accepts http connections.
I have configured http and https ...
1
vote
1
answer
5k
views
How to handle errors after sending request(camel-http)?
I want to handle errors depending on the http code response.
I would also like to know how to enable *throwExceptionOnFailure* on my route. For example, if the response code is 500x, send the message ...
0
votes
1
answer
2k
views
How to set HTTP Method dynamically from blueprint(Camel-http)
I use camel-apache companent camel-http. I'm trying to set the http method from my custom header. I use blueprint
override process:
exchange.getOut().setHeader("custom_http_method", "GET");
...
1
vote
0
answers
573
views
Enable jetty request logging/stats in Apache karaf container
Can anyone please tell us how to enable jetty logging to analyze the requests & other details(stats[parallel request/no of requests]) in Apache KARAF container.
Jetty.xml
<Configure class="...
1
vote
1
answer
782
views
Send data to an external resource: why content is null?
I have a simple Camel route. I want to extract a file from the queue and pass it by using POST request to an external resource. This route works and the request reaches an external resource:
import ...
3
votes
1
answer
709
views
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 ...
0
votes
1
answer
775
views
camel HTTP4 JBoss : unable to find valid certification path to requested target
I request a access token from a UAA service. recieve the token. then use the token to upload a file to an AWS environment. now it works with one environment and doesn't work with another. the only ...
0
votes
0
answers
1k
views
CAMEL HTTP4 post request was rejected because no multipart boundary was found
I'm using Camel-http4 because I simply need a producer, not expose a webservice. I simply need to push files up to an HTTP server, so this is a client implementation. the problem I am facing is the ...