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

...

In your Spring XML just use the CamelProxyFactoryBean to create a client side proxy implementing some interface which then sends messages to some remote Camel Endpoint such as ActiveMQ, JMS, File, HTTP, XMPP etc.

Then to implement the service you use CamelServiceExporter

The following example shows how to create a proxy which when invoked with fire a message to the direct:say endpoint

Wiki Markup
{snippet:id=proxy|lang=xml|url=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/remoting/spring-with-exporter.xml}

...

Wiki Markup
{snippet:id=export|lang=xml|url=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/remoting/spring-with-exporter.xml}

Using Custom Namespaces

In this example we use the Camel custom namespaces to make the XML much more concise. First, create a proxy via the proxy element

Wiki Markup
{snippet:id=proxy|lang=xml|url=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/remoting/spring-with-exporter-namespace.xml}

...

Wiki Markup
{snippet:id=export|lang=xml|url=activemq/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/spring/remoting/spring-with-exporter-namespace.xml}

...

As of 1.5 Camel supports the @InOnly and @Pattern annotations to let you specify which methods are not InOut (request/replyRequest Reply) but are InOnly (oneway , or fire and forget method calls Event Message).

For more details see Using Exchange Pattern Annotations

Include Page
CAMEL:Bean BindingCAMEL:
Bean Binding