Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

ghttp Component

Available as of Camel 2.1
The ghttp component contributes to the Camel Components for Google App Engine (GAE). It provides connectivity to the GAE URL fetch service but can also be used to receive messages from servlets (the only way to receive HTTP requests on GAE). This is achieved by extending the Servlet component. As a consequence, ghttp URI formats and options sets differ on the consumer-side (from) and producer-side (to).

...

Name

Default Value

Context

Description

bridgeEndpoint

true

Producer

If set to true the Exchange.HTTP_URI header will be ignored. To override the default endpoint URI with the Exchange.HTTP_URI header set this option to false.

throwExceptionOnFailure

true

Producer

Throw a org.apache.camel.component.gae.http if the response code is >= 400. To disable throwing an exception set this option to false.

inboundBindingRef

reference to GHttpBinding

Consumer

Reference to an InboundBinding<GHttpEndpoint, HttpServletRequest, HttpServletResponse> in the Registry for customizing the binding of an Exchange to the Servlet API. The referenced binding is used as post-processor to org.apache.camel.component.http.HttpBinding.

outboundBindingRef

reference to GHttpBinding

Producer

Reference to an OutboundBinding<GHttpEndpoint, HTTPRequest, HTTPResponse> in the Registry for customizing the binding of an Exchange to the URLFetchService.

urlFetchServiceRef

reference to URLFetchServiceFactory.getURLFetchService()

Producer

Reference to an URLFetchService in the Registry. Only relevant in context of testing.

On the consumer-side, all options of the Servlet component are supported.

...

For receiving messages via the ghttp component, a CamelHttpTransportServlet must be configured and mapped in the application's web.xml. For example, to handle requests targeted at http://<appname>.appspot.com/camel/* or http://localhost/camel/*Image Removed (when using a local development server) the following servlet mapping must be defined:

...

Code Block
java
java
from(...)
...
.to("ghttps://svn.apache.org/repos/asf/camel/trunk/")
...

Advanced usage

...

Dependencies

Maven users will need to add the following dependency to their pom.xml.

Code Block
xml
xml
titlepom.xml
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-gae</artifactId>
    <version>${camel-version}<<version>x.x.x</version>
</dependency>

...

Include Page
CAMEL:Endpoint See AlsoCAMEL:
Endpoint See Also