You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Guillaume Renault <gu...@bull.net> on 2009/01/22 13:24:28 UTC
Use of CXF on camel
Hi Camel users,
I'm a new user, and you may hear from me sometime ;)
i'm trying to use CXF as an access point on Camel. some questions are
crossing my mind:
1. Is it possible to just have annotated classes (Interface +
implementation) and let Camel exposes it as a webservice, without
any more information ? is it even possible to give Camel a simple
POJO without any annotation ?
2. If yes, what is the right procedure ? I'm not using spring, and
i'm working in an OSGi environment, as i'm integrating Camel into
JOnAS 5.1.X.
Do i need to first declare a CxfComponent, and then create an
Endpoint, and give it the service class ?
Do i need to just use the following :
Object implementor = new SayHello();
String address = "http://cxf.apache.org/transports/jms";
Endpoint endpoint = Endpoint.publish(address, implementor);
Or maybe something else ...
?
Btw, i'll have to talk with you about Camel on OSGi, i did have to do
some extends to make it correctly works ;), but it will come latter.
Regards,
Guillaume
--
Guillaume Renault - BULL Service
BULL - Architect of an Open World
Email : guillaume.renault@bull.net
Tel : +334 76 29 71 09
Office : B1-295
Web : http://jasmine.ow2.org
(\ _ /)
(='.'=)
(")-(")
Re: Use of CXF on camel
Posted by Willem Jiang <wi...@gmail.com>.
Hi,
Please see my comments in the mail.
Guillaume Renault wrote:
> Hi Camel users,
>
> I'm a new user, and you may hear from me sometime ;)
> i'm trying to use CXF as an access point on Camel. some questions are
> crossing my mind:
>
> 1. Is it possible to just have annotated classes (Interface +
> implementation) and let Camel exposes it as a webservice, without
> any more information ? is it even possible to give Camel a simple
> POJO without any annotation ?
Yes, Current camel-cxf component can support both annotated classes and
POJO without any annotation.
camel-cxf will check the SEI (Service Endpoint Interface), if it has the
@WebService annotation, camel-cxf will use the JAXWS frontend API to
publish the service or create a proxy of the web services, if it hasn't
any annotation camel-cxf will use simple front end API to those things.
> 2. If yes, what is the right procedure ? I'm not using spring, and
> i'm working in an OSGi environment, as i'm integrating Camel into
> JOnAS 5.1.X.
Please take go through the camel-cxf wiki page[1][2] first.
>
> Do i need to first declare a CxfComponent, and then create an
> Endpoint, and give it the service class ?
No, you just need to use a URI to specify the CXF endpoint, the Spring
configuration is not required.
> Do i need to just use the following :
>
> Object implementor = new SayHello();
> String address = "http://cxf.apache.org/transports/jms";
> Endpoint endpoint = Endpoint.publish(address, implementor);
>
> Or maybe something else ...
>
> ?
No, you don't need to create the endpoint yourself. camel-cxf component
will take care of that.
You can find more information in the cxf exmaple[2].
>
> Btw, i'll have to talk with you about Camel on OSGi, i did have to do
> some extends to make it correctly works ;), but it will come latter.
Please shot if you find anything wrong :)
>
> Regards,
>
> Guillaume
>
> --
> Guillaume Renault - BULL Service
> BULL - Architect of an Open World
> Email : guillaume.renault@bull.net
> Tel : +334 76 29 71 09
> Office : B1-295
> Web : http://jasmine.ow2.org
> (\ _ /)
> (='.'=)
> (")-(")
>
[1]http://camel.apache.org/cxf.html
[2]http://camel.apache.org/cxf-example.html
Willem