...
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} |
...