Hi,

Current CXF component sample POJO model shows your can invoke a WebService with a method name and arguments list. You can find more information about form the camel-cxf module's unit test[1] here.

[1]https://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerTest.java

Willem.

Ravi116 wrote:
Hi,
Is the web services example available now as part of snapshot download ? I am new to camel and cxf. My simple use case is to publish a message to a
active mq topic and have it route the message to a cxf web service. Here is
the sample code below -

private static String serviceEndpointURI = "cxf://" + SERVICE_ADDRESS + "?"
+ SERVICE_CLASS + "&dataFormat=POJO";
ConnectionFactory connectionFactory = new
ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
        context.addRoutes(new RouteBuilder() {

            public void configure() throws Exception {
                from("test-jms:queue:test.queue").to(serviceEndpointURI);
           }
        });
CamelTemplate template = new CamelTemplate(context);
context.start();
 for (int i = 0; i < 10; i++) {
            template.sendBody("test-jms:queue:test.queue", "Test Message: "
+ i);
 }
Thread.sleep(1000);
context.stop();

Will the code above work ? Ravi





willem.jiang wrote:
Hi ,
I am working on camel-cxf component which will help you to do some router work between 2 Web Services. My big patch just been applied in the trunk, you can take a look at the unit test of camel-cxf component.
https://svn.apache.org/repos/asf/activemq/camel/trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfRouterTest.java
I will add a Web Service router example some time this week  :)

Willem.
xtof wrote:
Hello,

I'm quite new to Camel, and I'm trying to understand how implementing a
gateway between 2 Web Services. It requires to implement a request-reply
mechanism but I cannot find any example.
Could you help?

Thank.
Christophe



Reply via email to