Six Stars

difference between cCXFRS and tRESTClient

Hi, 

 

Can someone explain me the difference between 

1. tRESTClient vs cREST producer ( cCXFRS in older versions)

2. tRESTRequest vs cREST consumer

 

I am trying to create routes that can get data from rest endpoints provided by a source system. I also need to send data to another target system using the rest end point. 

In this case, is cREST more suitable as I am dealing with routes?

 

Thanks,

sowjanya.

  • Data Integration
  • ESB
2 REPLIES
Highlighted
Employee

Re: difference between cCXFRS and tRESTClient

Hi,

It all depends on your use cases.

 

The tRestClient is used to call a rest service from generally a DI job.

The tRestRequest and tRestResponse allows us to build a rest service using the DI components.  Talend generates the Java code differently when you have a tRestRequest and tRestResponse in your job as it identifies the job as a service. 

 

The benefits of using tRestRequest and tRestResponse is that you can use your database connection components with Connection Pooling.  They are easier to use depending on what you need to do.

 

Another approach is to use th cTalendJob, which allows you to call a DI job with tRouteInput and tRouteOutput.  This way you build everything in Routes, and leverage cTalendJob when it comes to database connection and other features we have DI components for.

 

Hope that helps.

Irshad

 

 

 

Six Stars

Re: difference between cCXFRS and tRESTClient

Thank you for the reponse. that helps. I have another question to get more clarity. 

 

 

When I read the documentation for cCXFRS it has the below description. 

"cCXFRS provides integration with Apache CXF for connecting to JAX-RS services hosted in CXF.

what is mean by "hosted in CXF"?

 

Can I use cCXFRS consumer component to call a REST endpoint defined using tRESTRequest in a DI job? Can I use cCXFRS consumer to call any REST endpoints ( including restlets)? 

I had issues calling a rest endpoint defined in a DI job from Routes using cCXFRS, hence want to check if it is something supported. 

 

Thanks,

Sowjanya.