0

I am really new to datapower gateway scripts & i have small requirement. In datapower newly Gateway script is added from firmware 7.0 onwards. now i am trying to using the GWSript to develop the code to know the domain name and it's state. here the input is a export.xml file. from that file i need to capture the domain and state of domains and need to be display as a HTML table. output

If you have any idea about this. Please advise.

Ashkan Mobayen Khiabani
  • 33,575
  • 33
  • 102
  • 171
Mac
  • 1
  • 1

2 Answers2

0

You can get the name of the domain from a service variable:

http://www-01.ibm.com/support/knowledgecenter/SS9H2Y_7.2.0/com.ibm.dp.doc/var-service-domain-name_reference.html

Not sure what you mean by 'state' but perhaps this is helpful:

You could interrogate the var://service/system/status/DomainStatus variable

http://www-01.ibm.com/support/knowledgecenter/SS9H2Y_7.2.0/com.ibm.dp.doc/var-service-system-status_reference.html

AlphaGeek
  • 21
  • 4
0

GatewayScript to get the variables:

var sm = require ('service-metadata');
var domain = sm.getVar('var://service/domain-name');
var domainState = sm.getVar('var://service/system/status/DomainStatus');
Anders
  • 3,198
  • 1
  • 20
  • 43