Configuring constant parameters
NSM service designers can configure and populate constant parameters with constant values in the NSM service template XML when they design NSM service templates. The value is set, and it is not precalculated and it cannot change without having to update the NSM service template.
Procedure
As the NSM service
designer use
the following example as a guide to configuring constant parameters:
<constantParameters>
<constantParameter>
<name>UNTRUSTZONENAME</name>
<value>untrust</value>
</constantParameter>
<constantParameter>
<name>HTTPPARAMIPADDRESS</name>
<value>10.1.1.4</value>
</constantParameter>
</constantParameters>
Note: The
<constantParameters>
and </constantParameters>
elements
encapsulate one or more <constantParameter>
and </constantParameter>
elements.- Enter the required constant parameter name in the
<name>
tag for each<constantParameter>
XML element. In the example, two constant parameter names are defined:UNTRUSTZONENAME
andHTTPPARAMIPADDRESS
. - Enter the required value in the
<value>
tag for each<constantParameter>
XML element. In the example, two constant parameter values are defined:untrust
and10.1.1.4
.
When the service is executed, the values
untrust
and 10.1.1.4
are
used.Observe the following points when working with constant parameters:
- Constant parameters can be passed as arguments to inject, SQL, or HTTP parameters.
- The
<value>
tag is populated when the parameter is defined. - When the service is run, the value is used where the constant parameter is referenced.
- Constant parameters can be used as both global and local parameters in a NSM service template.