0

I have created an HTTP adapter and invoked a RESTFul service successfully, with following configuration

<protocol>http</protocol>
<domain>localhost</domain>
<port>8080</port>

However, I want to read these parameters from my own properties file. (Not from workligh.properties file).

How can I do this? Please help. I am using Worklight 6.0 version.

2 Answers2

0

Short answer is that you cannot change a JavaScript adapter's connectivity parameters during runtime.

Long answer is that you can define what those will be based on the environment you are test/using, via custom properties in worklight.properties and/or JNDI properties in your server.xml. For a detailed review of how this can be accomplished, see here: https://stackoverflow.com/a/25159260/1530814

Community
  • 1
  • 1
Idan Adar
  • 44,156
  • 13
  • 50
  • 89
0

Please update protocol,domain and port on the worklight.properties

protocol=http
domain=localhost
port=8080

and use following syntax on the .xml file

<protocol>${protocol}</protocol>
<domain>${domain}</domain>
<port>${port}</port>
Najeeb P
  • 81
  • 6