Dynamic WSDL address in tESBConsumer

Highlighted
One Star

Dynamic WSDL address in tESBConsumer

Is it possible to use a context variable as part of the WSDL location name when configuring the tESBConsumer component? I'm consuming a PeopleSoft webservice and our PeopleSoft server and environment are part of the WSDL file path. So, for example, the WSDL for our PeopleSoft Dev environment is:
"http://xxxxxxxxx.city.kingston.on.ca:11080/PSIGW/PeopleSoftServiceListeningConnector/FSDEV/JOURNAL_L..."
And the WSDL for consuming this same service from the PeopleSost UAT environment would be:
"http://yyyyyyyyy.city.kingston.on.ca:11080/PSIGW/PeopleSoftServiceListeningConnector/FSUAT/JOURNAL_L..."
I was hoping to be able to use context variable to set the WSDL as the following:
"http://" + context.server_name + "/PSIGW/PeopleSoftServiceListeningConnector/" + context.env_name + "/JOURNAL_LOAD_TEMPLATE.1.wsdl"
But this doesn't seem to work. Am I doing something wrong? Is there another way to achieve this result?
Thanks!
Jackie
Community Manager

Re: Dynamic WSDL address in tESBConsumer

Hi Jackie
I tested and found that it do not allow to contains double quote in the WSDL url, if I set the WSDL url and endpoint with a single context variables, it works. Before call the webservice, you can use a tJava component to initialize context variables. Please see my screenshots.
code on tJava:
context.url="http://"+context.host+"/services/"+context.env_name+"?WSDL";
context.endpoint="http://"+context.host+"/services/"+context.env_name;

Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: Dynamic WSDL address in tESBConsumer

I will try this. Thanks so much!
One Star

Re: Dynamic WSDL address in tESBConsumer

Hi shong,
I have followed your steps but in the configuration of the wsdl I can't get the ports and operations because it cannot check the wsdl... how can I put this context.url in the tESBConsumer?
Please see the attached images.
regards.
Felipe

Hi Jackie
I tested and found that it do not allow to contains double quote in the WSDL url, if I set the WSDL url and endpoint with a single context variables, it works. Before call the webservice, you can use a tJava component to initialize context variables. Please see my screenshots.
code on tJava:
context.url="http://"+context.host+"/services/"+context.env_name+"?WSDL";
context.endpoint="http://"+context.host+"/services/"+context.env_name;

Shong

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