camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael.Murphree" <>
Subject RE: Proxying web services
Date Tue, 16 Sep 2008 16:03:30 GMT

Hi Claus,

Thank you for the reply.

It would certainly be nice-to-have functionality if I wanted a simple HTTP
proxy route.  I'll add a JIRA ticket for this.

If I wanted to build the route myself, I take it I'll need to do things like
examine the incoming request to determine if it's a GET or a POST (for
example) and then reset those values accordingly.  BTW: I tried the syntax
you suggested to force a GET and Eclipse balks at the use of that enum.

Let me backtrack a bit and explain the environment.  I'm working with Camel
in an OSGi environment (Equinox) using Spring DM and a number of other
elements (like CXF and Muse).  I'm currently running the whole stack as a
launch configuration in Eclipse Ganymede.  HttpMethods is an enum, and
although the camel-http bundle exports that package, the JDT couldn't
resolve it.  I had to copy the source into my bundle as my own enum to make
it work.  (I suspect the Spring XML syntax would simply work, but I wanted
the ability to debug.)

The other thing of note is that the camel-jetty bundle appears to start it's
own embedded Jetty server.  Have you considered a plain OSGi HTTP Service
version of the Jetty component?  I haven't checked JIRA for this yet, but I
can add an enhancement ticket for this as well, if it seems good.



Claus Ibsen wrote:
> Hi
> This is indeed an interesting use-case.
> So basically you want Camel to pass through the query parameters from
> jetty producer to the http consumer and then return the HTTP body. 
> That would be pretty cool if that worked out-of-the-box. So lets add the
> use case as a JIRA ticket ;) So please create a JIRA ticket if you need
> this feature out-of-the-box.
> About the POST/GET you can instrument the http componet what to use by
> setting a special header with the choice.
> From("xxx")
> .setHeader(org.apache.camel.component.http.HttpMethods.HTTP_METHOD,
> constant(org.apache.camel.component.http.HttpMethods.GET))
> .to("xxx")
> Then you need to set the query parameters, you can do this also by setting
> a speical header
> From("xxx")
> .process(new Processor()) {
> Public void process(Exchange exchange) {
> // TODO: get the query parameters from jetty
> String param = ""
> headers.put(HttpProducer.QUERY, param);
> }
> BTW: We have refined jetty and http component in Camel 1.5, you could try
> the 1.5-SNAPSHOT to see how far we are from supporting this out-of-the-box
> already.
> Med venlig hilsen
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web:

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message