Re: HTTP endpoint

2013-09-05 Thread sacauskis
Thanks for the reply. This is what the code ultimately looked like: public class CamelHTTP { public static void main(String args[]) throws Exception { // create CamelContext final CamelContext context = new DefaultCamelContext(); // add o

Re: HTTP endpoint

2013-09-04 Thread Willem Jiang
If you want to set the query parameters, you need to set the header before sending the request. the HTTP method should be POST instead of GET, as you are send the data "mbl-stmt=(synloader(bounding-box 90 -180 -90180)(products(SYN)))". Willem Jiang Red Hat, Inc. FuseSource is now part of Red

Re: HTTP Endpoint construction in CamelSpringTest

2013-01-24 Thread Claus Ibsen
On Thu, Jan 24, 2013 at 4:56 PM, Zemin Hu wrote: > You are right. I was trying too hard to use CamelSpringTestSupport, thinking > it might be simpler to start my route and to test it together. I am wrong. > This CamelSpringTestSupport can do other tests, say file in Ibsen's book, > but not for ser

Re: HTTP Endpoint construction in CamelSpringTest

2013-01-24 Thread Zemin Hu
You are right. I was trying too hard to use CamelSpringTestSupport, thinking it might be simpler to start my route and to test it together. I am wrong. This CamelSpringTestSupport can do other tests, say file in Ibsen's book, but not for servlet. I am going to quit using CamelSpringTestSupport, jus

Re: HTTP Endpoint construction in CamelSpringTest

2013-01-24 Thread Willem jiang
Hi, What does your routes look like? Do you need to simulate the Server behavior to the client (which could be a camel route) to test? If you want to use the HttpUnit, you have to use the HttpUnit client API to invoke the service. You can also try to start a embed Jetty server which can hold th

Re: HTTP Endpoint construction in CamelSpringTest

2013-01-24 Thread Zemin Hu
Actually I have been considering using jetty, I just have not tried out yet. Let me know if you have some ready samples in hand for this purpose. I would imagine if I use jetty, I have to put "jetty:" in front of all URIs, then remove them after unit test, if you want to do test again, you have to

Re: HTTP Endpoint construction in CamelSpringTest

2013-01-24 Thread Claus Ibsen
Hi The "servlet" component requires you to run inside a Servlet container, such as Apache Tomcat, Jetty, and ESB containers such as ServiceMix etc. When you run it standalone as unit test, then there is no servlet container, and you cannot use that. You can swap the servlet with jetty instead. T

Re: http endpoint, unknown host and errorhandler

2012-04-18 Thread Bob Jolliffe
OK. I had http endpoint as input to my route which I think caused it to poll indefinitely. Using a timer makes it more sane. http://apps.dhis2.org/dev/api/metaData.xml?httpClient.authenticationPreemptive=true&authMethod=Basic&authUsername=admin&authPassword=district"/> On 18 April 2012 13:

Re: Http Endpoint

2009-05-24 Thread Claus Ibsen
On Sun, May 24, 2009 at 9:28 PM, jpcook wrote: > > Hi, so this works and I have added support for proxy username and password. > As I have subclassed the httpclientconfigurer it should already be possible > to use the existing getter/setter methods in the http component from the > spring configura

Re: Http Endpoint

2009-05-24 Thread jpcook
Hi, so this works and I have added support for proxy username and password. As I have subclassed the httpclientconfigurer it should already be possible to use the existing getter/setter methods in the http component from the spring configuration. eg) something like:

Re: Http Endpoint

2009-05-24 Thread jpcook
Hi, About this last point, do you mean overload the httpcomponents constructor? Currently it doesn't have one. I'm not that familiar with the xml configuration side of things. Is there a unit test I could look at? I searched for xml with bean id in but there isn't anything in camel core or the ca

Re: Http Endpoint

2009-05-11 Thread Claus Ibsen
On Mon, May 11, 2009 at 10:15 AM, jpcook wrote: > > Thanks for the advice. I created a new ticket (CAMEL-1599) and hope to submit > a patch today or tomorrow :) Fantastic. Submitting patches open a door. That is how I got started with Camel :) > > Claus Ibsen-2 wrote: >> >> On Fri, May 8, 2009 a

Re: Http Endpoint

2009-05-11 Thread jpcook
Thanks for the advice. I created a new ticket (CAMEL-1599) and hope to submit a patch today or tomorrow :) Claus Ibsen-2 wrote: > > On Fri, May 8, 2009 at 5:53 PM, Claus Ibsen wrote: >> On Fri, May 8, 2009 at 5:49 PM, jpcook >> wrote: >>> >>> Yes I can do it a bit later. I might even submit a

Re: Http Endpoint

2009-05-08 Thread Claus Ibsen
On Fri, May 8, 2009 at 5:53 PM, Claus Ibsen wrote: > On Fri, May 8, 2009 at 5:49 PM, jpcook wrote: >> >> Yes I can do it a bit later. I might even submit a patch :) >> >> When you say via URI do you mean something like: >> http://www.google.co.uk?httpClient.proxyName=host?httpClient.proxyPort=808

Re: Http Endpoint

2009-05-08 Thread Claus Ibsen
On Fri, May 8, 2009 at 5:49 PM, jpcook wrote: > > Yes I can do it a bit later. I might even submit a patch :) > > When you say via URI do you mean something like: > http://www.google.co.uk?httpClient.proxyName=host?httpClient.proxyPort=8080 Yeah but the httpClient prefix should not be needed. So

Re: Http Endpoint

2009-05-08 Thread jpcook
Yes I can do it a bit later. I might even submit a patch :) When you say via URI do you mean something like: http://www.google.co.uk?httpClient.proxyName=host?httpClient.proxyPort=8080 Claus Ibsen-2 wrote: > > Hi > > Good findings. > > Lets add the proxy options to camel-http so you can set

Re: Http Endpoint

2009-05-08 Thread Claus Ibsen
Hi Good findings. Lets add the proxy options to camel-http so you can set it easily from the URI. Looks like the HostConfiguration object isnt easy to access currently. Do you mind creating a JIRA ticket for this? Link to JIRA from this page: http://camel.apache.org/support.html On Fri, May

Re: Http Endpoint

2009-05-08 Thread jpcook
I have successfully created a simple unit test testing a get using the apache http client without camel. public static void main(String[] args) { // TODO Auto-generated method stub HttpClient client = new HttpClient(); HttpMethod method = new GetMethod("htt

Re: Http Endpoint

2009-05-07 Thread Claus Ibsen
On Thu, May 7, 2009 at 10:03 PM, jpcook 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 >> wrote: >>> >>> Hell

Re: Http Endpoint

2009-05-07 Thread jpcook
And is it possible to get at the Apache HttpClient via the Camel Http endpoint? Claus Ibsen-2 wrote: > > On Thu, May 7, 2009 at 6:37 PM, jpcook > 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 testHtt

Re: Http Endpoint

2009-05-07 Thread Claus Ibsen
On Thu, May 7, 2009 at 6:37 PM, jpcook 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/ht