Dynamic Rest Endpoint in tRestRequest Component

Five Stars

Dynamic Rest Endpoint in tRestRequest Component

Hi,

 

I'm new with Talend ESB. I wonder is it possible to set dynamic rest endpoint on tRestRequest component?

 

I've tried to set rest endpoint with context and globalMap but the job failure to start when I deploy it on apache karaf (runtime esbse) container. When I check using command list-endpoints on apache karaf console, the job that I deployed listen on address becomes "/context.service_url" which supposed to be "http://10.50.50.32:8090". Any idea how to solve this?

 

Thanks.

Roy.

Community Manager

Re: Dynamic Rest Endpoint in tRestRequest Component

It sounds like you are mixing String constants with String variables incorrectly. Anything within quotes should be considered a constant. A context variable cannot be included inside those quotes. If you want to mix and match you need to concatenate like below....

 

"/mybasepath/"+context.MyVariable

You should also realise that once a service has started in your runtime, you cannot change the URL without restarting the service first.

Five Stars

Re: Dynamic Rest Endpoint in tRestRequest Component

Hi,

 

Sorry my mistake on writing the question. I don't used quotes on my talend rest endpoint, below is the step I've done:

img_01.PNGtRestRequest end point setting

img_02.PNGTestWS.cfg file inside karaf etc folder

img_03.PNGJob active on karaf

img_04.PNGlist-endpoints command result

noticed on the yellow marked result. At this point the port is not listening, I cannot access the service.

 

Thanks.

Five Stars

Re: Dynamic Rest Endpoint in tRestRequest Component

Hi,

 

Anyone can help me with this issue?

 

Thanks.

Five Stars

Re: Dynamic Rest Endpoint in tRestRequest Component

Did you solve this problem? I would sure like to know how. 

 

I think I am seeing the same thing. For Studio on Tomcat, I can use REST Endpoint=context.deployedhostname which is "http://localhost:8080" and it works fine. But when I deploy to ESB, context.deployedhostname is literal, not the value of the variable! In karaf the hostname and port are supposed to be assigned by the server, and if you specify them, it will overwrite the server defaults, and probably not match the server firewall, SSL, etc. 

 

So really you need to use a context variable for the endpoint, but it does not work in the karaf container. 

 

Furthermore I found the ESB port number will be overwritten and use a random number if Rest Endpoint is a null string. So it seems this component is really broken. 

Moderator

Re: Dynamic Rest Endpoint in tRestRequest Component

Hello,

We have already redirected your issue to our ESB experts and will keep you posted.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Moderator

Re: Dynamic Rest Endpoint in tRestRequest Component

Hello,

Here exists a new feature jira issue:https://jira.talendforge.org/browse/TESB-11530.

Please take a look at it and feel free to let us know your concern.

Thanks for your time.

Best regards

Sabrina

 

 

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: Dynamic Rest Endpoint in tRestRequest Component

Thanks. That's the same bug for sure. It was logged 4 months ago, but there does not seem to be progress yet. Everyplace else in TOS that substitution would work, seems like it should be fixed ASAP.
Moderator

Re: Dynamic Rest Endpoint in tRestRequest Component

Hello,

Please feel free to vote for this jira issue and add your comment in it.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: Dynamic Rest Endpoint in tRestRequest Component

Hi,

 

I never solved the problem. And seems no one can suggestion a solution, so I decided to hard code the url on the compnent. Not as I expected, but no choice.

 

Cheers.

One Star

Re: Dynamic Rest Endpoint in tRestRequest Component

I am facing the same issue .context variables are not getting resolved when i am deploying the job to TAC.

Please Help as It has become very difficult to keep the same artifact for different environment.

 

 

Moderator

Re: Dynamic Rest Endpoint in tRestRequest Component

Hello,

This jira issue https://jira.talendforge.org/browse/TESB-11530 is still in process.

We will keep you posted.

Best regards

Sabrina

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Fifteen Stars TRF
Fifteen Stars

Re: Dynamic Rest Endpoint in tRestRequest Component

Hello,

I'm also facing the same issue.

I've tried with both 6.4.1 and 7.1.1 version with the same result. As soon as the Endpoint REST is configured with a context variable in the Studio, the Karaf "list-endpoints" command result is false (the value of the Address field is equal to /context.myContextVariable) as shown on the following capture:

2019-04-24 20_06_20-Karaf.png

Jira cases # TESB-11530 is still unresolved.

It seems the only workarround is to use relative hard coded endpoint instead of a context variable.

Can someone confirm or give a better/definitive answer regarding this issue?

 

Thank's a lot


TRF

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

An API-First Approach to Modernizing Applications

Learn how to use an API-First Approach to Modernize your Applications

Watch Now

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read