cREST Standard properties - Cloud - 8.0

Apache CXF (Mediation)

Version
Cloud
8.0
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > Apache CXF components (Mediation)
Data Quality and Preparation > Third-party systems > Apache CXF components (Mediation)
Design and Development > Third-party systems > Apache CXF components (Mediation)
Last publication date
2024-02-21

These properties are used to configure cREST running in the Standard Job framework.

The Standard cREST component belongs to the Connectivity family.

Basic settings

API Definition / Definition

Select the way the API definition will be set.

  • Built-In: The API definition will be set locally for this component. You need to specify the values for all related connection properties manually.

  • Repository: The API definition stored centrally in Repository > REST API Definitions will be reused by this component.

    You need to click the [...] button next to it and in the pop-up Repository Content dialog box, select the API definition to be reused, and all related properties will be automatically filled in.

If you have installed the R2023-05 Talend Studio Monthly update or a later one delivered by Talend, you can drag and drop a REST API Definition from the Metadata node of the Repository tree view to the design workspace to create a cREST component.

Endpoint

The service endpoint URL where the REST service is provided. You can either specify an explicit port number, for example, "http://localhost:8088/services/customers", or use the default port of Talend and specify the relative path only, for example, "/services/customers".

The default port is different depending on the build type or where you run the service:
  • To run the service inside Talend Studio: 8090
  • To run the service in a Talend Runtime Container: for HTTP 8040 is used for all services, and if HTTPS is enable on Talend Runtime the service is also exposed on 9001.
  • To run the service as a Microservice: 8065

You can define the endpoint using context variables. For more information about Talend Studio Monthly update, check with your administrator.

Type

Select which type you want to use to provide the REST service. Either Manual or resourceClass.

Manual: Determine the REST API mapping manually in the table if cREST is used as a service provider, or set HTTP Method and other parameters if the component is used as a service consumer.

resourceClass: Select this type to provide the resource class which you want to export as the REST service.

REST API Mapping

This table appears when the Manual service type is selected and cREST is used as a service provider.

Click [+] under the table to add as many rows as needed to specify the HTTP request:

Output Flow: Specify the name of an output flow.

HTTP Verb: Select a HTTP method from GET, POST, PUT, DELETE, OPTIONS, HEAD, and PATCH in the list.

URI pattern: Fill this field with the REST URI that describes the resource.

Consumes: Select the format type of the consume content that the component will use from XML or JSON, XML, JSON, Form, Multipart, and Any when HTTP Verb is POST, PUT, or PATCH.

Produces: Select the format type of the produce content that the component will use from XML or JSON, XML, JSON, HTML, Any when HTTP Verb is GET, POST, PUT, DELETE, or PATCH.

Bean class: Set the bean class when the HTTP Verb is POST, PUT, or PATCH and the consume content format is XML or JSON, XML or JSON.

Resource Class

This field appears when the resourceClass service type is selected. Enter the name of the resource class which you want to export as the REST service.

Operation

This field appears when the resourceClass service type is selected and cREST is used as the service consumer. Enter the name of the operation.

Relative Path

This field appears when the Manual service type is selected and cREST is used as the service consumer. Enter the relative path of the REST server to be invoked.

HTTP Method

This option appears when the Manual service type is selected and cREST is used as the service consumer. Select a HTTP method from GET, POST, PUT, DELETE, PATCH, HEAD, and OPTIONS in the list.
Warning:

When using the POST method to create an object, by default, the created object ID will not be get back from the header. By default, the cREST filters any header except system headers. To get the created object ID, you need to set javax.ws.rs.core.Response as the response class.

Content Type

This option appears when the Manual service type is selected and cREST is used as the service consumer.

Select XML, JSON, or FORM according to the media type of the content to be uploaded to the server end. This list appears only when you select the POST, PUT, or PATCH in the HTTP Method list.

Accept Type

This field appears when the Manual service type is selected and cREST is used as the service consumer.

Select the media type the client end is prepared to accept for the response from the server end. Available options are XML, JSON, and ANY. When ANY is selected, the response message can be of any type and will be transformed into a string. This list does not appear when you select the DELETE method.

Response Class

This field appears when the Manual service type is selected and the cREST is used as the service consumer. Enter the name of the response class.

Skip incoming data unmarshalling

Select this check box to skip the unmarshalling of the server response data. This option is used when the server already provides the data that the Route can work on, and the need for type conversion can be avoided.

Use Service Locator

Select this check box to enable the Service Locator. Specify the service namespace and the service name in the corresponding fields.

Enable the Service Activity Monitoring

Select this check box to enable the Service Activity Monitor.

Note that this option works in Runtime only. When running the Route in Talend Studio, it is recommended to clear this check box. Otherwise warnings will be thrown in the execution console.

Use Authentication

Select this check box to enable the authentication option. Select the authentication type from:

  • HTTP Basic: The simplest technique for enforcing access controls to web resources using standard fields in the HTTP header.
  • SAML Token (ESB runtime only): An XML-based, open-standard data format for exchanging authentication and authorization data between an identity provider and a service provider.
  • Open ID Connect: An extension for OAuth2 which allows Clients to verify the identity of the End-User based on the authentication performed by an Authorization Server, as well as to obtain basic profile information about the End-User in an interoperable and REST-like manner. For more information, see Talend Identity and Access Management and Managing ESB Resources and authorizations.

When the cREST component is used as consumer, enter a username and a password in the corresponding fields as required. To enter the password, click the [...] button next to the password field, and then in the pop-up dialog box enter the password between double quotes and click OK to save the settings.

Use Authorization

This option is only available if you subscribed to Talend Enterprise ESB solutions. It appears when SAML Token (ESB runtime only) is selected in the Use Authentication list.

When the cREST component is used as the service provider, select this check box to enable authorization.

When the cREST component is used as the service consumer, select this check box to invoke authorized call and specify the client's role in the Role field.

Use Business Correlation

Select this check box to create a correlation ID in this component.

You can specify a correlation ID in the Correlation Value field.

Advanced settings

Log messages

Select this check box to log the message exchanges in the Route.

Arguments Set the optional arguments in the corresponding table. Click [+] as many times as required to add arguments to the table. Then click the corresponding Value field and enter a value. See the site http://camel.apache.org/cxfrs.html for available URI options.

Usage

Usage rule

cREST can be a start component in a Route as the service provider, or middle or end component as the service consumer.

Limitation

Due to license incompatibility, one or more JARs required to use this component are not provided. You can install the missing JARs for this particular component by clicking the Install button on the Component tab view. You can also find out and add all missing JARs easily on the Modules tab in the Integration perspective of Talend Studio. For details, see Installing external modules.