camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicky Sandhu <karajd...@gmail.com>
Subject Re: Reading a HTML document from an URL
Date Fri, 19 Oct 2007 20:44:23 GMT

Then there is this test
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-http/src/test/java/org/apache/camel/component/http/HttpGetTest.java?view=markup

which uses something like
from("direct:start").setHeader(HttpProducer.QUERY,constant("hl=en&q=activemq")).to("http://www.google.com/search").to("mock:results")

Would that work for you?

gnodet wrote:
> 
> I think the problem is that by default, if you use
>   from("http://...")
> the component creates a web server and listens for request.
> Or does it make a difference between a remote host and a local host ?
> even, you may want to GET an html page from a local host.
> 
> On 10/19/07, James Strachan <james.strachan@gmail.com> wrote:
>> On 18/10/2007, bgoetzmann <bgoetzmann@sophia.symag.com> wrote:
>> >
>> > Hi,
>> >
>> > This is a simple question: I thought that read a HTML/XML document from
>> an
>> > URL could be do in that way:
>> >
>> > from("http://www.odelia-technologies.com/").to...
>> >
>> > but it doesn't work!
>> >
>> > How can one do this?
>> >
>> > Thank you.
>>
>> Would
>>
>> from("http://www.odelia-technologies.com/index.html").to...
>>
>> help?
>>
>> We currently don't do a spider like
>>
>>   wget -r http://www.odelia-technologies.com/
>>
>> would; so you'd have to HTTP GET the exact URL you need for the HTML
>> page.
>>
>> --
>> James
>> -------
>> http://macstrac.blogspot.com/
>>
>> Open Source SOA
>> http://open.iona.com
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Reading-a-HTML-document-from-an-URL-tf4646579s22882.html#a13302653
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message