You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mauricio Chamati <mc...@gmail.com> on 2012/02/16 14:28:50 UTC

Using Camel to as WS Broker

Guys, I've read a lot under camel forums and tutorials, but I could not
found an easy way to use it as a Web Service (WS) broker. I know that it
sounds easy, and I thought camel would work, but I could get it. Any help
would be appreciate, follows the situation: I have many applications
providing their own WS. I would like to have my application (using camel)
to provide a unique point of access (an ESB). How would I do that with
Camel? Any simple example would be appreciate. I am using Java 6.0.30,
Spring 3.1.0 and the last version of Camel.

Thanks!

Re: Using Camel to as WS Broker

Posted by Mauricio Chamati <mc...@gmail.com>.
Sounds exactly what I need, I will test it and send a feedback.
Thanks!


On Thu, Feb 16, 2012 at 11:58 PM, ychawla <pr...@yahoo.com>wrote:

> Hi Guys,
> It looks like you want to use a single service as a facade to the multiple
> services behind the scenes.  Camel can do that.  Does the service that you
> want to use as the facade have a WSDL/Service Spec?  If yes, you can set up
> a CXF endpoint in either Payload or POJO mode for that service.  Your route
> can then provide a content based router to route to your other services.
>
> I would start up configuring a simple route with your back end services and
> then put a facade in front of it.
>
> For example in payload mode:
>
>  <cxf:cxfEndpoint
>    id="myBackendService"
>    address="http://localhost:8080/backend"
>    wsdlURL="classpath:backend.wsdl"
>    serviceName="test:ServiceService"
>    endpointName="test:Service"
>    xmlns:test="http://www.test.com"
>    />
>
>  <cxf:cxfEndpoint
>    id="myFacadeService"
>    address="http://localhost:8080/backend"
>    wsdlURL="classpath:facade.wsdl"
>    serviceName="test:ServiceService"
>    endpointName="test:Service"
>    xmlns:test="http://www.test.com"
>    />
>
>    <camel:route errorHandlerRef="myDeadLetterErrorHandler">
>      <camel:from uri="cxf:bean:myFacadeService?format=PAYLOAD"/>
>
>      insert content based router here based on operation name or using
> XPath filtering on content in message
>
>       <camel:to uri="cxf:bean:myBackendService?format=PAYLOAD"/>
>    </camel:route>
>
> You can also set up other routes to feed your web service like a simple
> file
> drop.  If you prefer to do that outside of Camel, a tool like Soap UI would
> help.  Start off my exposing  single service in your route and build up
> from
> there.  You can use some of the existing Maven archetypes to get you up and
> running pretty fast.
>
> Cheers,
> Yogesh
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Using-Camel-to-as-WS-Broker-tp5489513p5491253.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Using Camel to as WS Broker

Posted by ychawla <pr...@yahoo.com>.
Hi Guys,
It looks like you want to use a single service as a facade to the multiple
services behind the scenes.  Camel can do that.  Does the service that you
want to use as the facade have a WSDL/Service Spec?  If yes, you can set up
a CXF endpoint in either Payload or POJO mode for that service.  Your route
can then provide a content based router to route to your other services.

I would start up configuring a simple route with your back end services and
then put a facade in front of it.

For example in payload mode:

  <cxf:cxfEndpoint 
    id="myBackendService"
    address="http://localhost:8080/backend"
    wsdlURL="classpath:backend.wsdl"
    serviceName="test:ServiceService"
    endpointName="test:Service"
    xmlns:test="http://www.test.com"
    />

  <cxf:cxfEndpoint 
    id="myFacadeService"
    address="http://localhost:8080/backend"
    wsdlURL="classpath:facade.wsdl"
    serviceName="test:ServiceService"
    endpointName="test:Service"
    xmlns:test="http://www.test.com"
    />

    <camel:route errorHandlerRef="myDeadLetterErrorHandler">
      <camel:from uri="cxf:bean:myFacadeService?format=PAYLOAD"/>
      
      insert content based router here based on operation name or using
XPath filtering on content in message      
	
       <camel:to uri="cxf:bean:myBackendService?format=PAYLOAD"/>
    </camel:route>

You can also set up other routes to feed your web service like a simple file
drop.  If you prefer to do that outside of Camel, a tool like Soap UI would
help.  Start off my exposing  single service in your route and build up from
there.  You can use some of the existing Maven archetypes to get you up and
running pretty fast.

Cheers,
Yogesh

--
View this message in context: http://camel.465427.n5.nabble.com/Using-Camel-to-as-WS-Broker-tp5489513p5491253.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Using Camel to as WS Broker

Posted by David Karlsen <da...@gmail.com>.
I'm wondering about doing the same - but haven't got that far yet.
Probably camel + cxf component would be the best route.'

Or camel + http component if you really do not care about the soap
stuff - but I guess you will.

2012/2/16 Mauricio Chamati <mc...@gmail.com>:
> Guys, I've read a lot under camel forums and tutorials, but I could not
> found an easy way to use it as a Web Service (WS) broker. I know that it
> sounds easy, and I thought camel would work, but I could get it. Any help
> would be appreciate, follows the situation: I have many applications
> providing their own WS. I would like to have my application (using camel)
> to provide a unique point of access (an ESB). How would I do that with
> Camel? Any simple example would be appreciate. I am using Java 6.0.30,
> Spring 3.1.0 and the last version of Camel.
>
> Thanks!



-- 
--
David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen