Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

This component has been deprecated in favor to servicemix-http component.

...

This JBI component uses Commons HttpClient to perform client side HTTP invocations. Here is a typical example of a JBI component which performs a HTTP invocation when it is invoked.

...

...

Server side HTTP binding

This JBI component will expose another JBI component over HTTP on some port and HTTP configuration. We use an embedded Jetty component for this, though we also have a BindingServlet which can be configured from inside any web.xml in a Servlet WAR.

Here's an example of configuring the default HTTP connector.

...

...

Using HTTP binding in a WAR

You may wish to configure ServiceMix's HTTP binding inside a WAR. To do this you need to register one or more instances of the SpringBindingServlet in your web.xml then map the servlet to the URI you wish.

Here's an example

...

...

Notice that the web.xml then refers to the endpoint name httpBinding in the ServiceMix configuration file. e.g. this component

...

...

Example of using the HTTP binding in a WAR

The ServiceMix WAR comes with an example of using a HTTP GET or POST to invoke a JBI operation. To run the example get the latest checkout then perform the following

...

...

Then point your browser to http://localhost:8080/examples/

...

An alternative is to use your existing Servlet engine and type this instead

...

...

Then deploy the war into your servlet engine. You'll typically need to use a different URL then such as http://localhost:8080/servicemix-web/examples/

...