To form JSON for add command REST Driver NETQRESTJSON-otp-XDS policy returns only one value from multi-valued attribute ( in the trace log fragment "languages" attribute) , second value miss:

[02/06/17 20:33:11.380]:ETM ST:Applying policy: %+C%14CNETQRESTDCFG-otp-AddAssociation%-C.
[02/06/17 20:33:11.380]:ETM ST: Applying to add #1.
[02/06/17 20:33:11.381]:ETM ST: Evaluating selection criteria for rule 'Add association to unassociated users upon Migration.'.
[02/06/17 20:33:11.381]:ETM ST: (if-xpath true "//status[@level="success"]") = FALSE.
[02/06/17 20:33:11.381]:ETM ST: Rule rejected.
[02/06/17 20:33:11.381]:ETM ST: Evaluating selection criteria for rule 'Add association to unassociated groups upon Migration.'.
[02/06/17 20:33:11.382]:ETM ST: (if-xpath true "//status[@level="success"]") = FALSE.
[02/06/17 20:33:11.382]:ETM ST: Rule rejected.
[02/06/17 20:33:11.382]:ETM ST:Policy returned:
[02/06/17 20:33:11.382]:ETM ST:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.5.4.0">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<add cached-time="20170206183310.514Z" class-name="users" event-id="srv-idmcore#20170206183310#1#1:5f1bf2f3-f012-402f-b088-f3f21b5f12f0" qualified-src-dn="O=data\OU=users\CN=mirgo.gorban" src-dn="\ELISA-TREE\data\users\mirgo.gorban" src-entry-id="33734" timestamp="1486405990#1">
<association>mirgo.gorban</association>
<add-attr attr-name="username">
<value naming="true" timestamp="1485292247#39" type="string">mirgo.gorban</value>
</add-attr>
<add-attr attr-name="name">
<value timestamp="1485292247#21" type="string">Mirgo Gorban</value>
</add-attr>
<add-attr attr-name="email">
<value timestamp="1485292247#8" type="string">mirgo.gorban@test.local</value>
</add-attr>
<add-attr attr-name="active_start_date">
<value type="string">03.06.1996</value>
</add-attr>
<add-attr attr-name="avaya_id">
<value timestamp="1486405990#1" type="string">9899</value>
</add-attr>
<add-attr attr-name="reseller_id">
<value type="string">null</value>
</add-attr>
<add-attr attr-name="languages">
<value type="string">Eesti</value>
</add-attr>
<add-attr attr-name="languages">
<value type="string">Inglise</value>
</add-attr>
<add-attr attr-name="roles">
<value type="string">Agent</value>
</add-attr>
<operation-data association="mirgo.gorban" src-dn="\ELISA-TREE\data\users\mirgo.gorban">
<entitlement-impl id="7216a533f76a441e9084d4548168b508:67f0757fbe174 8e4858f3e8f5cc57479" name="role" qualified-src-dn="O=data\OU=users\CN=mirgo.gorban" src="AF" src-dn="\ELISA-TREE\data\users\mirgo.gorban" src-entry-id="33734" state="1">Agent</entitlement-impl>
</operation-data>
</add>
</input>
</nds>
[02/06/17 20:33:11.385]:ETM ST:Applying policy: %+C%14CNETQRESTJSON-otp-XDStoJSON%-C.
[02/06/17 20:33:11.385]:ETM ST: Applying to add #1.
[02/06/17 20:33:11.385]:ETM ST: Evaluating selection criteria for rule 'Translate XDS to JSON'.
[02/06/17 20:33:11.385]:ETM ST: (if-operation not-match "instance") = TRUE.
[02/06/17 20:33:11.385]:ETM ST: (if-operation not-equal "driver-operation-data") = TRUE.
[02/06/17 20:33:11.385]:ETM ST: Rule selected.
[02/06/17 20:33:11.385]:ETM ST: Applying rule 'Translate XDS to JSON'.
[02/06/17 20:33:11.385]:ETM ST: Action: do-if().
[02/06/17 20:33:11.385]:ETM ST: Evaluating conditions.
[02/06/17 20:33:11.386]:ETM ST: (if-operation match "status") = FALSE.
[02/06/17 20:33:11.386]:ETM ST: Performing else actions.
[02/06/17 20:33:11.386]:ETM ST: Action: do-if().
[02/06/17 20:33:11.386]:ETM ST: Evaluating conditions.
[02/06/17 20:33:11.386]:ETM ST: (if-class-name available) = TRUE.
[02/06/17 20:33:11.386]:ETM ST: (if-class-name not-equal "DirXML-Driver") = TRUE.
[02/06/17 20:33:11.386]:ETM ST: Performing if actions.
[02/06/17 20:33:11.386]:ETM ST: Action: do-set-local-variable("operations",scope="policy",arg-node-set(token-xpath("."))).
[02/06/17 20:33:11.386]:ETM ST: arg-node-set(token-xpath("."))
[02/06/17 20:33:11.387]:ETM ST: token-xpath(".")
[02/06/17 20:33:11.387]:ETM ST: Token Value: {<add> @cached-time = "20170206183310.514Z" @class-name = "users" @event-id = "srv-idmcore#20170206183310#1#1:5f1bf2f3-f012-402f-b088-f3f21b5f12f0" @qualified-src-dn = "O=data\OU=users\CN=mirgo.gorban" @src-dn = "\ELISA-TREE\data\users\mirgo.gorban" @src-entry-id = "33734" @timestamp = "1486405990#1"}.
[02/06/17 20:33:11.387]:ETM ST: Arg Value: {<add> @cached-time = "20170206183310.514Z" @class-name = "users" @event-id = "srv-idmcore#20170206183310#1#1:5f1bf2f3-f012-402f-b088-f3f21b5f12f0" @qualified-src-dn = "O=data\OU=users\CN=mirgo.gorban" @src-dn = "\ELISA-TREE\data\users\mirgo.gorban" @src-entry-id = "33734" @timestamp = "1486405990#1"}.
[02/06/17 20:33:11.388]:ETM ST: Action: do-for-each(arg-node-set(token-local-variable("operations"))).
[02/06/17 20:33:11.388]:ETM ST: arg-node-set(token-local-variable("operations"))
[02/06/17 20:33:11.388]:ETM ST: token-local-variable("operations")
[02/06/17 20:33:11.388]:ETM ST: Token Value: {<add> @cached-time = "20170206183310.514Z" @class-name = "users" @event-id = "srv-idmcore#20170206183310#1#1:5f1bf2f3-f012-402f-b088-f3f21b5f12f0" @qualified-src-dn = "O=data\OU=users\CN=mirgo.gorban" @src-dn = "\ELISA-TREE\data\users\mirgo.gorban" @src-entry-id = "33734" @timestamp = "1486405990#1"}.
[02/06/17 20:33:11.389]:ETM ST: Arg Value: {<add> @cached-time = "20170206183310.514Z" @class-name = "users" @event-id = "srv-idmcore#20170206183310#1#1:5f1bf2f3-f012-402f-b088-f3f21b5f12f0" @qualified-src-dn = "O=data\OU=users\CN=mirgo.gorban" @src-dn = "\ELISA-TREE\data\users\mirgo.gorban" @src-entry-id = "33734" @timestamp = "1486405990#1"}.
[02/06/17 20:33:11.389]:ETM ST: Performing actions for local-variable(current-node) = <add> @cached-time = "20170206183310.514Z" @class-name = "users" @event-id = "srv-idmcore#20170206183310#1#1:5f1bf2f3-f012-402f-b088-f3f21b5f12f0" @qualified-src-dn = "O=data\OU=users\CN=mirgo.gorban" @src-dn = "\ELISA-TREE\data\users\mirgo.gorban" @src-entry-id = "33734" @timestamp = "1486405990#1".
[02/06/17 20:33:11.390]:ETM ST: Action: do-set-local-variable("xmlInput",notrace="true",scope="policy", token-base64-encode(charset="UTF-8",token-replace-all("&lt;","<",token-xml-serialize(token-xpath("$current-op"))))).
[02/06/17 20:33:11.390]:ETM ST: -- trace suppressed --
[02/06/17 20:33:11.390]:ETM ST: Action: do-set-local-variable("applicationContent",notrace="true",scope ="policy",token-xpath("rs:xdsToJSON($xmlInput)")).
[02/06/17 20:33:11.391]:ETM ST: -- trace suppressed --
[02/06/17 20:33:11.391]:ETM ST: Action: do-if(notrace="true").
[02/06/17 20:33:11.391]:ETM ST: -- trace suppressed --
[02/06/17 20:33:11.391]:ETM ST: Action: do-clone-xpath(dest-expression="../driver-operation-data[last()]",notrace="true",src-expression="$current-op/operation-data").
[02/06/17 20:33:11.392]:ETM ST: Action: do-strip-xpath("$current-op",notrace="true").
[02/06/17 20:33:11.392]:ETM ST:Policy returned:
[02/06/17 20:33:11.392]:ETM ST:
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.5.4.0">DirXML</product>
<contact>NetIQ Corporation</contact>
</source>
<input>
<driver-operation-data class-name="users" command="add" event-id="srv-idmcore#20170206183310#1#1:5f1bf2f3-f012-402f-b088-f3f21b5f12f0" src-dn="\ELISA-TREE\data\users\mirgo.gorban">
<request>
<url-token association="mirgo.gorban"/>
<header content-type="application/json"/>
<value>{"association":"mirgo.gorban","username":["mirgo.gorban"],"name":["Mirgo Gorban"],"email":["mirgo.gorban@test.local"],"active_start_date":["03.06.1996"],"avaya_id":["9899"],"reseller_id":["null"],"languages":["Inglise"],"roles":["Agent"]}</value>
</request>
<operation-data association="mirgo.gorban" src-dn="\ELISA-TREE\data\users\mirgo.gorban">
<entitlement-impl id="7216a533f76a441e9084d4548168b508:67f0757fbe174 8e4858f3e8f5cc57479" name="role" qualified-src-dn="O=data\OU=users\CN=mirgo.gorban" src="AF" src-dn="\ELISA-TREE\data\users\mirgo.gorban" src-entry-id="33734" state="1">Agent</entitlement-impl>
</operation-data>
</driver-operation-data>
</input>
</nds>

Any ideas ? I think this is REST driver "bug" ...

AivarsK

e-mail: aivarsk@mits.lv