Talend ESB: cREST component: dynamic endpoint

Six Stars

Talend ESB: cREST component: dynamic endpoint

Hi,

 

I am on Talend enterprise edition. I am using a cREST client.  I want to use a header value and a context variable to calculate the endpoint url. i.e In the endpoint textbox I want use something like this 

"${header.instance_url}" + context.sfdc_sales_order_endpoint+"/" 

 

Can someone provide an example on how I could achieve this?

So far I am able to use context variables, but not headers. I tried simple expression but it isn't getting resolved. 

 

Thanks,

Sowjanya

 

 

 

Thanks,

Sowjanya.

 

 


Accepted Solutions
Nine Stars

Re: Talend ESB: cREST component: dynamic endpoint

Hi,

1-A solution could be adding a cProcess before your cRest component:

Capture.PNG

This address will override the one of your component.

 

Or you can add a cSetHeader before your cRest component (You will have to add a cConfig with this import instruction "import org.apache.camel.Exchange;"):

 Capture.PNG

2-Another solution could be using a dynamic computed Endpoint (With DSL toD instruction. See http://camel.apache.org/message-endpoint.html). You can have a look at this post:
https://community.talend.com/t5/Design-and-Development/Talend-ESB-cREST-component-dynamic-endpoint/t...

 

Eric


All Replies
Nine Stars

Re: Talend ESB: cREST component: dynamic endpoint

Hi,

1-A solution could be adding a cProcess before your cRest component:

Capture.PNG

This address will override the one of your component.

 

Or you can add a cSetHeader before your cRest component (You will have to add a cConfig with this import instruction "import org.apache.camel.Exchange;"):

 Capture.PNG

2-Another solution could be using a dynamic computed Endpoint (With DSL toD instruction. See http://camel.apache.org/message-endpoint.html). You can have a look at this post:
https://community.talend.com/t5/Design-and-Development/Talend-ESB-cREST-component-dynamic-endpoint/t...

 

Eric

Six Stars

Re: Talend ESB: cREST component: dynamic endpoint

worked. Thank you. 

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.