Four 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.

  • ESB
3 REPLIES
Ten Stars

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.

Rilhia Solutions
Four 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:

tRestRequest end point settingtRestRequest end point setting

TestWS.cfg file inside karaf etc folderTestWS.cfg file inside karaf etc folder

Job active on karafJob active on karaf

list-endpoints command resultlist-endpoints command result

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

 

Thanks.

Four Stars

Re: Dynamic Rest Endpoint in tRestRequest Component

Hi,

 

Anyone can help me with this issue?

 

Thanks.