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
3 REPLIES
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