camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Http Endpoint
Date Fri, 08 May 2009 05:09:11 GMT
On Thu, May 7, 2009 at 10:03 PM, jpcook <jonathan.cook@erars.plus.com> wrote:
>
> And is it possible to get at the Apache HttpClient via the Camel Http
> endpoint?
Yes there should be some getter/setters to configure how you like it.


>
> Claus Ibsen-2 wrote:
>>
>> On Thu, May 7, 2009 at 6:37 PM, jpcook <jonathan.cook@erars.plus.com>
>> wrote:
>>>
>>> Hello,
>>>
>>> I am playing around with the http endpoint in camel 2 and I thought a
>>> good
>>> starting point would be to run the testHttpGet() in
>>> http://svn.apache.org/viewvc/camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpGetTest.java
>>>
>>> So nothing happens. It just hangs. I suspect this might be because I need
>>> to
>>> configure a proxy but I'm not sure how to do that and I can't find any
>>> examples really apart from an old post but again it isn't clear to me.
>>>
>>> This is the configure method:
>>> @Override
>>>    protected RouteBuilder createRouteBuilder() throws Exception {
>>>        return new RouteBuilder() {
>>>            public void configure() {
>>>                from("direct:start")
>>>                .setHeader(HttpConstants.HTTP_METHOD,
>>> constant(org.apache.camel.component.http.HttpMethods.GET))
>>>                    .to("http://www.google.co.uk").to("mock:results");
>>>            }
>>>        };
>>>    }
>>>
>>> I also tried specifying the time out in the endpoint eg)
>>> "http://www.google.co.uk?httpClient.soTimeout(5000)"
>> You should set it with = as parameter, its like URI parameters.
>> "http://www.google.co.uk?httpClient.soTimeout=5000"
>>
>>
>>
>>>
>>> But that didn't do anything. I wasn't sure if there was a way I could at
>>> least get something back.
>>>
>>> I've also read this useful page. Maybe it would be useful to have an
>>> example
>>> as most corporations will be using proxy servers.
>>> http://camel.apache.org/http.html
>> Yeah socket proxy in Java kinda sucks as you often need to set it with
>> system properties.
>>
>> Maybe  the HTTP client have nice configuration for proxy. Feel free to
>> look at Apache HTTP Client how to work with proxy.
>> And report your findings, then we can improve Camel to ease the proxy
>> configuration.
>>
>>
>>>
>>> Thanks
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Http-Endpoint-tp23430772p23430772.html
>>> Sent from the Camel - Users (activemq) mailing list archive at
>>> Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>> Apache Camel Reference Card:
>> http://refcardz.dzone.com/refcardz/enterprise-integration
>> Interview with me:
>> http://architects.dzone.com/articles/interview-claus-ibsen-about?mz=7893-progress
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Http-Endpoint-tp23430772p23434084.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Apache Camel Reference Card:
http://refcardz.dzone.com/refcardz/enterprise-integration
Interview with me:
http://architects.dzone.com/articles/interview-claus-ibsen-about?mz=7893-progress

Mime
View raw message