camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Owain McGuire <ow...@integration.technology>
Subject Re: Camel HTTPS - timing out
Date Thu, 29 Jun 2017 12:03:38 GMT
From the doc: http://camel.apache.org/http4.html <http://camel.apache.org/http4.html>

Setting the Exchange.HTTP_URI overrides the URI on the endpoint.  

"The URI to call. The value of this option will override the existing URI that's set directly
on the endpoint. It's not the same as the Camel endpoint URI, where you can configure endpoint
options such as security etc. This header does not support that, it's only the URI of the
HTTP server.”


So you should have the myhost.com in the header as well and just have http4:seeHeader in the
endpoint with any other endpoint options you need.  Alternatively put the whole lot in the
endpoint and nothing in the URI header.  

URI in one of the other but not both.

HTH.
  
> On 29 Jun 2017, at 12:10, ganga_camel <ganga.db@gmail.com> wrote:
> 
> Hi,
> 
> I have a requirement to download the data from a rest API. I am using https
> endpoint to call the rest API.
> 
> The code is as listed below, when I try to access the Rest API through
> Postman, its working fine and downloads a file with 50 MB. Where as when I
> am trying to access the API through the code that is listed below, it always
> times out.
> 
> Am I missing on something. Any help or guidance is highly appreciated.
> 
> public void configure() throws Exception {
>        from("timer://foo?fixedRate=true&period=600000")
>                .routeId("Locations file")
>                .log(LoggingLevel.INFO,"File fetch route started started")
>                .removeHeaders("*")
>                .setHeader("CamelHttpMethod", constant("GET"))
>                .setHeader(Exchange.HTTP_URI,
> constant("https://apiurl?key=keyvalue&httpClient.soTimeout=12000000"))
>                .to("http4://myhost.com")
>                .log(LoggingLevel.INFO, "File fetch started started")
>                .to("file:Out1/fileName=loc.xml&noop=true")
>                .end();
> 
>      //  My properties file has this url
>    }
> 
> Thanks
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/Camel-HTTPS-timing-out-tp5805429.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message