Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning
titleWarning

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

We support both a client side HTTP (capable of invoking requests on remote HTTP servers) and a server side HTTP binding (for exposing JBI components over HTTP). Note that both these 2 components are pure HTTP bindings; they assume that a REST or SOAP service creates the inbound request first. So they just deal with the HTTP transport and do not perform any protocol encoding such as SOAP 1.1 or SOAP 1.2; they pass along the XML they are given.

...

Wiki Markup
{snippet:id=send|lang=xml|url=http://svn.apache.org/repos/asf/incubator/servicemix/trunk/servicemix-components/src/test/resources/org/apache/servicemix/components/http/example.xml}

...

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.

...

Wiki Markup
{snippet:id=binding|lang=xml|url=http://svn.apache.org/repos/asf/incubator/servicemix/trunk/servicemix-components/src/test/resources/org/apache/servicemix/components/http/example.xml}

...

Using HTTP binding in a WAR

...

Wiki Markup
{snippet:id=httpBinding|lang=xml|url=http://svn.apache.org/repos/asf/incubator/servicemix/trunk/tooling/servicemix-web/src/webapp/WEB-INF/web.xml}

...

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

Wiki Markup
{snippet:id=http|lang=xml|url=http://svn.apache.org/repos/asf/incubator/servicemix/trunk/tooling/servicemix-web/src/webapp/WEB-INF/applicationContext.xml}

...

Example of using the HTTP binding in a WAR

...

Code Block
cd tooling/servicemix-web
maven run

...

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

...

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

Code Block
maven war

...

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/

...