ID/IDREF Support

ID type attributes uniquely identify, by a string value, elements in a XML document. IDREF attributes enable other elements to reference the specified element. An IDREF attribute must not be used in a document before the ID it references is defined.

A parameter element can specify an ID attribute so that its output value from the callMethod request will be saved and referred to later in another parameter element by an IDREF attribute. If a parameter element contains an IDREF attribute, the value of the given parameter is used as the input value for the parameter element. For example, the output value from referenced parameter is used instead of the value in the XML.

<?xml version='1.0' ?>
<jdeRequest type='callmethod' user='steve' pwd='xyz' role='*ALL' 
environment='prod' session=''>
<callMethod name='myfunc' app='P42101' trans='t1' runOnError='yes'>
<params>
<param name='CostCtr'>    1001</param>
<param name='Company1' id='c1'></param>
<param name='Company2' id='c2'></param>
</params>
</callMethod>
<callMethod name='myfunc2' app='P42101' trans='t1' runOnError='yes'>
<params>
<param name='Company1' idref='c1'></param>
</params>
<returnParams><param idref='c2'/></returnParams>
</callMethod>
</jdeRequest>

You can specify a special request tag called returnParams that can contain one or more parameter elements. If the parameter elements contain IDREF attributes, then the referenced values are copied into the response.