Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Dynamic URL Endpoint configuration in web source module

steddy21Jul 26 2021 — edited Jul 30 2021

When implementing the web source modules using the apex I ran into difficulty in configuring the URL_ENDPOINT to be dynamic based on environment.
Here is how I did,
Step 1: Created a remote server in the work space utilities it is like if I create a module using the remote server where I provided Static Identifier as: Sales, Base URL: www.google.dev.sales.com (just as example), Prompt On Install: On (switch to on)
Step2: Created a web source module in the shared components of application in that work space by selecting Sales in the Remote Server select list.
Step3: Provided headers which are dynamic based on page Item Value(No Auth Required)
Step4: Got the response (happy so far)
Question:
When I move this code to test I want the Base URL in remote serve be like: www.google.test.sales.com, and for uat: www.google.uat.sales.com, for prod: www.google.prod.sales.com and so on.
The only way I found to make it possible is after I export the app from dev work space, manually edit the sql file and manually change the values in there, so every environment I promote I have to do this and which is not correct since I need to check in the file to a version control tool so that app code is same across all environments ideally.
Other way do the web service call programmatically either on apex page or create a database package and call that on the page, manually parse the json, etc. Either of these options take away the APEX functionality of low code.
I created an Application Item (set scope to be Global) and computation on it to select the value from a table where I stored the URLs but unable to pass that as a parameter in the URL section of remote server, this also did not work.
How do I make the APEX select url based on environment from a table?

Apex Version I am using: 19.2.00.18 (I tried Version 20.1 and it is the same case).
Thanks,
Sree

Comments

Post Details

Added on Jul 26 2021
0 comments
592 views