Problem to parse <param> value from structured Attribute
nrfAssignedResources of a dynamic resource.

I need to identify the value of the assigned dynamic resource at the
user object.
I think, i have to use the "XML Parse" token to parse <param> from
<component name="path">, but the result is not a valid xml document.
(see trace)

<instance class-name="User"
qualified-src-dn="O=data\OU=users\OU=employee\CN=353858"
src-dn="\IDMDEMOTREE\data\users\employee\353858" src-entry-id="33703">
<association state="associated">353858</association>
<attr attr-name="nrfAssignedResources">
<value timestamp="1405018028#1" type="structured">
<component name="nameSpace">1</component>
<component name="volume">\IDMDEMOTREE\system\driverset1\User
Application Driver\AppConfig\RoleConfig\ResourceDefs\User Account
Entitlement</component>
*<component
name="path">*&lt;assignment>&lt;start_tm>201407101 84708Z&lt;/start_tm>&lt;req_tm>20140710184708Z&lt;/req_tm>&lt;inst-guid>b789b155e9ac48a69ce8aebb93e995ca&lt;/inst-guid>&lt;req>cn=uaadmin,ou=sa,o=data&lt;/req>&lt;req_desc>re
ad&lt;/req_desc>&lt;ent-ref>&amp;lt;?xml version="1.0"
encoding="UTF-8"?>&amp;lt;ref>
&amp;lt;src>UA&amp;lt;/src>
&amp;lt;id/>
&AMP;LT;PARAM>{\"ID\":\"2K3.GUHDEMO.LOCAL\"}&AMP;L T;/PARAM>
&amp;lt;/ref>
&lt;/ent-ref>&lt;ent-dn>O=system\CN=driverset1\CN=AD2k3\CN=UserAccount& lt;/ent-dn>&lt;parameter>&lt;value
parm-key="EntitlementParamKey">{"ID":"2k3.guhdemo.local "}&lt;/value>&lt;/parameter>&lt;cause>&lt;type>user&lt;/type>&lt;/cause>&lt;/assignment></component>
</value>

Has anybody an hint?

regards,
Karsten


TRACE


[07/24/14 20:24:41.263]:Manual_Resource ST: Action:
do-trace-message("second try - parse xml").
[07/24/14 20:24:41.263]:Manual_Resource ST:
arg-string("second try - parse xml")
[07/24/14 20:24:41.263]:Manual_Resource ST:
token-text("second try - parse xml")
[07/24/14 20:24:41.263]:Manual_Resource ST: Arg Value:
"second try - parse xml".
[07/24/14 20:24:41.264]:Manual_Resource ST:second try - parse xml
[07/24/14 20:24:41.264]:Manual_Resource ST: Action:
do-set-local-variable("*lv_nrfAssignedResources_path_xml",scope ="policy",arg-node-set(token-xml-parse(token-xpath("$current-node/component[@name='path']/text()")))).*
[07/24/14 20:24:41.264]:Manual_Resource ST:
arg-node-set(token-xml-parse(token-xpath("$current-node/component[@name='path']/text()")))
[07/24/14 20:24:41.264]:Manual_Resource ST:
token-xml-parse(token-xpath("$current-node/component[@name='path']/text()"))
[07/24/14 20:24:41.264]:Manual_Resource ST:
token-xml-parse(token-xpath("$current-node/component[@name='path']/text()"))
[07/24/14 20:24:41.264]:Manual_Resource ST:
token-xpath("$current-node/component[@name='path']/text()")
[07/24/14 20:24:41.265]:Manual_Resource ST: Token
Value:
"*<assignment><start_tm>20140723221355Z</start_tm><req_tm>20140723221354Z</req_tm><inst-guid>1e2892c9304740ffbdc6f5d85b9aa9db</inst-guid><req>cn=uaadmin,ou=sa,o=data</req><req_desc>Requested
by onboarding driver</req_desc><ent-ref>&lt;?xml version="1.0"
encoding="UTF-8"?>&lt;ref>
&lt;src>UA&lt;/src>
&lt;id/>
&lt;param>{"ID":"COR24"}&lt;/param>
&lt;/ref>
</ent-ref><ent-dn>O=system\CN=driverset1\CN=Manual
Resource\CN=Account</ent-dn><parameter><value
parm-key="EntitlementParamKey">{"ID":"COR24"}</value></parameter><cause><type>user</type></cause></assignment>".
[07/24/14 20:24:41.266]:Manual_Resource ST: Arg
Value:
"<assignment><start_tm>20140723221355Z</start_tm><req_tm>20140723221354Z</req_tm><inst-guid>1e2892c9304740ffbdc6f5d85b9aa9db</inst-guid><req>cn=uaadmin,ou=sa,o=data</req><req_desc>Requested
by onboarding driver</req_desc><ent-ref>&lt;?xml version="1.0"
encoding="UTF-8"?>&lt;ref>
&lt;src>UA&lt;/src>
&lt;id/>
&lt;param>{"ID":"COR24"}&lt;/param>
&lt;/ref>
</ent-ref><ent-dn>O=system\CN=driverset1\CN=Manual
Resource\CN=Account</ent-dn><parameter><value
parm-key="EntitlementParamKey">{"ID":"COR24"}</value></parameter><cause><type>user</type></cause></assignment>*".
[07/24/14 20:24:41.267]:Manual_Resource ST: Token
Value: {/}.
[07/24/14 20:24:41.267]:Manual_Resource ST: Arg Value:
{/}.
[07/24/14 20:24:41.267]:Manual_Resource ST: Action:
do-for-each(arg-node-set(token-local-variable("lv_nrfAssignedResources_path_xml"))).
[07/24/14 20:24:41.267]:Manual_Resource ST:
arg-node-set(token-local-variable("lv_nrfAssignedResources_path_xml"))
[07/24/14 20:24:41.267]:Manual_Resource ST:
token-local-variable("lv_nrfAssignedResources_path_xml")
[07/24/14 20:24:41.267]:Manual_Resource ST: Token
Value: {/}.
[07/24/14 20:24:41.268]:Manual_Resource ST: Arg Value:
{/}.
[07/24/14 20:24:41.268]:Manual_Resource ST: Performing
actions for local-variable(current-node) = /.
[07/24/14 20:24:41.268]:Manual_Resource ST: Action:
do-trace-message("current-node:
"+token-local-variable("current-node")).
[07/24/14 20:24:41.268]:Manual_Resource ST:
arg-string("current-node: "+token-local-variable("current-node"))
[07/24/14 20:24:41.268]:Manual_Resource ST:
token-text("current-node: ")
[07/24/14 20:24:41.268]:Manual_Resource ST:
token-local-variable("current-node")
[07/24/14 20:24:41.268]:Manual_Resource ST: Token
Value:
"*20140723221355Z20140723221354Z1e2892c9304740ffbd c6f5d85b9aa9dbcn=uaadmin,ou=sa,o=dataRequested
by onboarding driver<?xml version="1.0" encoding="UTF-8"?><ref>
<src>UA</src>
<id/>
<param>{"ID":"COR24"}</param>
</ref>
O=system\CN=driverset1\CN=Manual
Resource\CN=Account{"ID":"COR24"}user*".
[07/24/14 20:24:41.269]:Manual_Resource ST: Arg
Value: "current-node:
20140723221355Z20140723221354Z1e2892c9304740ffbdc6 f5d85b9aa9dbcn=uaadmin,ou=sa,o=dataRequested
by onboarding driver<?xml version="1.0" encoding="UTF-8"?><ref>
<src>UA</src>
<id/>
<param>{"ID":"COR24"}</param>
</ref>
O=system\CN=driverset1\CN=Manual
Resource\CN=Account{"ID":"COR24"}user".
[07/24/14 20:24:41.269]:Manual_Resource ST:current-node:
20140723221355Z20140723221354Z1e2892c9304740ffbdc6 f5d85b9aa9dbcn=uaadmin,ou=sa,o=dataRequested
by onboarding driver<?xml version="1.0" encoding="UTF-8"?><ref>
<src>UA</src>
<id/>
<param>{"ID":"COR24"}</param>
</ref>
O=system\CN=driverset1\CN=Manual Resource\CN=Account{"ID":"COR24"}user
[07/24/14 20:24:41.270]:Manual_Resource ST: Action:
do-set-local-variable("lv_nrfAssignedResources_path_xml_param", scope="policy",token-xpath("$lv_nrfAssignedResources_path_xml/ref/param/text()")).
[07/24/14 20:24:41.270]:Manual_Resource ST:
arg-string(token-xpath("$lv_nrfAssignedResources_path_xml/ref/param/text()"))
[07/24/14 20:24:41.270]:Manual_Resource ST:
*token-xpath("$lv_nrfAssignedResources_path_xml/ref/param/text()")*
[07/24/14 20:24:41.270]:Manual_Resource ST: *Token
Value: "".*
[07/24/14 20:24:41.271]:Manual_Resource ST: Arg Value:
"".
[07/24/14 20:24:41.271]:Manual_Resource ST: Action:
do-set-local-variable("lv_nrfAssignedResources_path_xml_param_v alue",scope="policy",token-xpath("es:getEntParamField($lv_nrfAssignedResource s_path_xml_param,
'ID')")).
[07/24/14 20:24:41.271]:Manual_Resource ST:
arg-string(token-xpath("es:getEntParamField($lv_nrfAssignedResource s_path_xml_param,
'ID')"))
[07/24/14 20:24:41.271]:Manual_Resource ST:
token-xpath("es:getEntParamField($lv_nrfAssignedResource s_path_xml_param,
'ID')")
[07/24/14 20:24:41.273]:Manual_Resource ST: Token
Value: "".
[07/24/14 20:24:41.273]:Manual_Resource ST: Arg Value:
"".
[07/24/14 20:24:41.273]:Manual_Resource ST: Action:
do-trace-message("lv_nrfAssignedResources_path_xml_param_va lue:
"+token-local-variable("lv_nrfAssignedResources_path_xml_param_v alue")).
[07/24/14 20:24:41.273]:Manual_Resource ST:
arg-string("lv_nrfAssignedResources_path_xml_param_val ue:
"+token-local-variable("lv_nrfAssignedResources_path_xml_param_v alue"))
[07/24/14 20:24:41.274]:Manual_Resource ST:
token-text("lv_nrfAssignedResources_path_xml_param_value : ")
[07/24/14 20:24:41.274]:Manual_Resource ST:
token-local-variable("lv_nrfAssignedResources_path_xml_param_v alue")
[07/24/14 20:24:41.274]:Manual_Resource ST: Token
Value: "".
[07/24/14 20:24:41.274]:Manual_Resource ST: Arg Value:
"lv_nrfAssignedResources_path_xml_param_value: ".
[07/24/14 20:24:41.274]:Manual_Resource
ST:lv_nrfAssignedResources_path_xml_param_value:


--
kweimann
------------------------------------------------------------------------
kweimann's Profile: https://forums.netiq.com/member.php?userid=2077
View this thread: https://forums.netiq.com/showthread.php?t=51404