I'm using url-open()
function but I'm getting an empty response.
Asked
Active
Viewed 338 times
0

Itai Klapholtz
- 196
- 1
- 2
- 15

Itachi Uchiha
- 13
- 4
-
1Can you please provide some more specific information? – Itai Klapholtz Nov 01 '22 at 06:26
-
i have a file in datapower which contains server urls and i want to call that server url in my xslt node in api gateway v10 – Itachi Uchiha Nov 01 '22 at 10:22
-
Please provide enough code so others can better understand or reproduce the problem. – Community Nov 01 '22 at 17:23
1 Answers
0
Something like this should work. You don't need to do urlopen if you are running the code from the same appliance.
<!-- Load config file -->
<xsl:variable name="configFile" select="document('local:///myfolder/servers.xml')" />
<!-- Look in the XML file to find your server -->
<xsl:variable name="myURL">
<xsl:copy-of select="$configFile/config/Servers/Server[@name='prod']/url" />
</xsl:variable>
<?xml version="1.0" encoding="utf-8"?>
<config>
<Servers>
<Server name="prod">
<url>www.google.com</url>
</Server>
<Server name="dev">
<url>www.yahoo.com</url>
</Server>
</Servers>
</config>

Matt
- 11
- 1