You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by bharadwaj <bh...@gmail.com> on 2015/06/19 06:35:14 UTC

what is the best approach to consume restful service?

We have differ options to consume reftful services like cxfRS, jetty, http. 

My requirement is to consume restful service without service class also it
should be able to support CXF bus configuration to have global configuration
cxf endpoints. 

I know we have cxfRS but it's mandatory to use service class in lesser than
camel 2.15 version, camel 2.15 introduced modelRef which can be used without
service class, 

currenlty we are using camel 2.12 version could please suggest us which
step/approach use to consume reffull service without using service?(client
doesn't provide us service class) 


Thanks,
Bharadwaj nakka



--
View this message in context: http://camel.465427.n5.nabble.com/what-is-the-best-approach-to-consume-restful-service-tp5768381.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: what is the best approach to consume restful service?

Posted by contactreji <co...@gmail.com>.
Hi Bharadwaj

Can you be specific. Are you planning to consume a rest service or expose a
rest service? The implementation is different for both. You need the
annotated java classes only if you are exposing the rest point

1) If you are exposing ( server ), you can either use cxfrs or camel-restlet
component. Find the sample POC at below url which I have coded.
https://www.dropbox.com/sh/99r1fbic7z3s355/AACtISev3q3UPy8U-pFSxRJza?dl=0

2) If you are planning to consume (client) a rest service, you can even use
the normal http / http4 or restlet producer endpoint. Just specify the http
method you plan to use appropriately and the data/body/entity which has to
be passed to the service shud be part of camel exchange body.

Cheers
Reji



-----
Reji Mathews
Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel & Jboss Fuse ESB | Mule ESB )
LinkedIn - http://in.linkedin.com/pub/reji-mathews/31/9a2/40a
Twitter - reji_mathews
--
View this message in context: http://camel.465427.n5.nabble.com/what-is-the-best-approach-to-consume-restful-service-tp5768381p5768384.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: what is the best approach to consume restful service?

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 19/06/15 05:35, bharadwaj wrote:
> We have differ options to consume reftful services like cxfRS, jetty, http.
>
> My requirement is to consume restful service without service class also it
> should be able to support CXF bus configuration to have global configuration
> cxf endpoints.
>
> I know we have cxfRS but it's mandatory to use service class in lesser than
> camel 2.15 version, camel 2.15 introduced modelRef which can be used without
> service class,
Just would like to clarify here that 'modelRef' can be used to have 
interfaces only without JAX-RS annotations or even have no 
interfaces/service classes at all with the descriptions in the CXF 
specific model language provided (with the plan to support arbitrary 
language descriptions).
The other new option is to have an interface only, without having to 
provide a service class with no-op methods;
Sergey
>
> currenlty we are using camel 2.12 version could please suggest us which
> step/approach use to consume reffull service without using service?(client
> doesn't provide us service class)
>
>
> Thanks,
> Bharadwaj nakka
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/what-is-the-best-approach-to-consume-restful-service-tp5768381.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>