NAMED PARAMETER

From IQsimWiki

Jump to: navigation, search

Named parameters are those that are entered XIQS Command XML request in the form:

 <param type="string">ParameterName='ParameterValue'</param>


Example of the XML request using both unnamed and Named parameters:

[REQUEST]
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<command tid="a2642009-a860-4f8a-a3b2-f588dfecb739" name="updateXIQSPricePlan">
<param type="long">100000</param>
<param type="string">name='TestPP'</param>
<param type="string">paytype='3'</param>
...
</command>

First parameter (in this example "Price Plan Id") is unnamed, but the following parameters ("Price Plan Name", "PricePlan type", ...) are Named.


Only Named parameters can be Optional in the middle of XML request. If the parameters are not named than you have to enter them all, in the correct order.

Example of XML request using only unnamed parameters:

[REQUEST]
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<command tid="047a2525-41ea-4916-b47e-ec9e57751d69" name="updateXIQSAllocRule">
<param type="long">7</param>
<param type="string">testAR</param>
<param type="integer">0</param>
<param type="string">110111111111111111111111</param>
<param type="string">113111111111111111111111</param>
<param type="string">111111111111111111111111</param>


Here even if you do not want to specify for example "Time schedule mask for Tuesday" (5th parameter in this XML request), you are obliged to include it in XML request, so unnamed parameters are all Mandatory.

Only exception from this rule with unnamed parameters is that you can have unnamed Optional parameters at the end of XML request. For example updateXIQSIPConfig XML request has 7 unnamed parameters, first 3 are Mandatory and the (complete) block of remaining 4 is Optional.

Personal tools
Namespaces
Variants
Views
Actions
Navigation
XIQS XML Protocol
XIQS Framework Libraries
XIQS Command List