Hi all,

We are using IDM version 3.6.

I am using the following article:
- 'Query a Connected System from a Driver not Connected to that System
| Novell User Communities'
(http://www.novell.com/communities/node/6302)

So I have configured the following local vars:

x-Query:


Code:
--------------------
<do-set-local-variable name="x-Query" scope="policy">
<arg-node-set>
<token-xml-parse>
<token-text xml:space="preserve">&lt;nds dtdversion="3.5" ndsversion="8.x">
&lt;source>
&lt;product version="3.5.11.20080307 ">DirXML&lt;/product>
&lt;contact>Novell, Inc.&lt;/contact>
&lt;/source>
&lt;input>
&lt;query class-name="User" scope="subtree">
&lt;search-class class-name="User"/>
&lt;search-attr attr-name="sAMAccountName">
&lt;value>tetimmer&lt;/value>
&lt;/search-attr>
&lt;read-attr/>
&lt;/query>
&lt;/input>
&lt;/nds></token-text>
</token-xml-parse>
</arg-node-set>
</do-set-local-variable>
--------------------


x-DriverDN:


Code:
--------------------
<do-set-local-variable name="x-DriverDN" scope="policy">
<arg-string>
<token-text xml:space="preserve">Services\Driverset\Active Directory</token-text>
</arg-string>
</do-set-local-variable>
--------------------


x-SendQuery:


Code:
--------------------

<do-set-local-variable name="x-SendQuery" scope="policy">
<arg-node-set>
<token-xpath expression="dircmd:sendDriverCommand($x-DriverDN, $x-Query)"/>
</arg-node-set>
</do-set-local-variable>
--------------------


x-CheckQuery:


Code:
--------------------
<do-set-local-variable name="x-CheckQuery" scope="policy">
<arg-node-set>
<token-xml-serialize>
<token-local-variable name="x-SendQuery"/>
</token-xml-serialize>
</arg-node-set>
</do-set-local-variable>
--------------------



Things go wrong when IDM tries to execute the XPATH expression, see the
following log fragments:

> [12/05/08 11:22:28.917]lanon PT: Evaluating selection criteria for
> rule 'CP - Rule - Check Active Directory for userID'.
> [12/05/08 11:22:28.917]lanon PT: (if-class-name equal "User") =
> TRUE.
> [12/05/08 11:22:28.917]lanon PT: (if-operation equal "add") =
> TRUE.
> [12/05/08 11:22:28.917]lanon PT: Rule selected.
> [12/05/08 11:22:28.917]lanon PT: Applying rule 'CP - Rule - Check
> Active Directory for userID'.
> [12/05/08 11:22:28.917]lanon PT: Action:
> do-set-local-variable("x-Query",scope="policy",arg-node-set(token-xml-parse("<nds
> dtdversion="3.5" ndsversion="8.x">
> <source>
> <product version="3.5.11.20080307 ">DirXML</product>
> <contact>Novell, Inc.</contact>
> </source>
> <input>
> <query class-name="User" scope="subtree">
> <search-class class-name="User"/>
> <search-attr attr-name="sAMAccountName">
> <value>tetimmer</value>
> </search-attr>
> <read-attr/>
> </query>
> </input>
> </nds>"))).
> [12/05/08 11:22:28.917]lanon PT:
> arg-node-set(token-xml-parse("<nds dtdversion="3.5" ndsversion="8.x">
> <source>
> <product version="3.5.11.20080307 ">DirXML</product>
> <contact>Novell, Inc.</contact>
> </source>
> <input>
> <query class-name="User" scope="subtree">
> <search-class class-name="User"/>
> <search-attr attr-name="sAMAccountName">
> <value>tetimmer</value>
> </search-attr>
> <read-attr/>
> </query>
> </input>
> </nds>"))
> [12/05/08 11:22:28.917]lanon PT: token-xml-parse("<nds
> dtdversion="3.5" ndsversion="8.x">
> <source>
> <product version="3.5.11.20080307 ">DirXML</product>
> <contact>Novell, Inc.</contact>
> </source>
> <input>
> <query class-name="User" scope="subtree">
> <search-class class-name="User"/>
> <search-attr attr-name="sAMAccountName">
> <value>tetimmer</value>
> </search-attr>
> <read-attr/>
> </query>
> </input>
> </nds>")
> [12/05/08 11:22:28.917]lanon PT: token-xml-parse("<nds
> dtdversion="3.5" ndsversion="8.x">
> <source>
> <product version="3.5.11.20080307 ">DirXML</product>
> <contact>Novell, Inc.</contact>
> </source>
> <input>
> <query class-name="User" scope="subtree">
> <search-class class-name="User"/>
> <search-attr attr-name="sAMAccountName">
> <value>tetimmer</value>
> </search-attr>
> <read-attr/>
> </query>
> </input>
> </nds>")
> [12/05/08 11:22:28.932]lanon PT: token-text("<nds
> dtdversion="3.5" ndsversion="8.x">
> <source>
> <product version="3.5.11.20080307 ">DirXML</product>
> <contact>Novell, Inc.</contact>
> </source>
> <input>
> <query class-name="User" scope="subtree">
> <search-class class-name="User"/>
>
>
> <search-attr attr-name="sAMAccountName">
> <value>tetimmer</value>
> </search-attr>
> <read-attr/>
> </query>
> </input>
> </nds>")
> [12/05/08 11:22:28.932]lanon PT: Arg Value: "<nds
> dtdversion="3.5" ndsversion="8.x">
> <source>
> <product version="3.5.11.20080307 ">DirXML</product>
> <contact>Novell, Inc.</contact>
> </source>
> <input>
> <query class-name="User" scope="subtree">
> <search-class class-name="User"/>
> <search-attr attr-name="sAMAccountName">
> <value>tetimmer</value>
> </search-attr>
> <read-attr/>
> </query>
> </input>
> </nds>".
> [12/05/08 11:22:28.932]lanon PT: Token Value: {/}.
> [12/05/08 11:22:28.932]lanon PT: Arg Value: {/}.
> [12/05/08 11:22:28.932]lanon PT: Action:
> do-set-local-variable("x-DriverDN",scope="policy","Services\Driverset\Activ e
> Directory").
> [12/05/08 11:22:28.932]lanon PT:
> arg-string("Services\Driverset\Active Directory")
> [12/05/08 11:22:28.932]lanon PT:
> token-text("Services\Driverset\Active Directory")
> [12/05/08 11:22:28.932]lanon PT: Arg Value:
> "Services\Driverset\Active Directory".
> [12/05/08 11:22:28.932]lanon PT: Action:
> do-set-local-variable("x-SendQuery",scope="policy",arg-node-set(token-xpath("dircmd:sendDriverCommand($x-DriverDN,
> $x-Query)"))).
> [12/05/08 11:22:28.932]lanon PT:
> arg-node-set(token-xpath("dircmd:sendDriverCommand($x-DriverDN,
> $x-Query)"))
> [12/05/08 11:22:28.932]lanon PT:
> token-xpath("dircmd:sendDriverCommand($x-DriverDN, $x-Query)")
> [12/05/08 11:22:28.932]lanon PT:
> DirXML Log Event -------------------
> Driver: \IDM-TREE\Services\Driverset\Planon
> Channel: Publisher
> Object: PK_CODE=35486,table=V_PERS,schema=PLANDBA
> Status: Error
> Message: Code(-9131) Error in
> vnd.nds.stream://IDM-TREE/Services/Driverset/Planon/Publisher/CP+-+Policy+-+Create+user+objects#XmlData:269
> : Error evaluating XPATH expression
> 'token-xpath("dircmd:sendDriverCommand($x-DriverDN, $x-Query)")' :
> com.novell.xml.xpath.XPathEvaluationException: function
> 'dircmd:sendDriverCommand' not found.


I have tried the following things to get it working, according to some
of the threads of this forum:
- dircmd:sendDriverCommand($x-DriverDN, $x-Query/nds)

But it does not complain about the params, it just doesn't know the
function, which is weird. Because I have triple checked the namespace,
and this is as it is supposed to be:
prefix: dircmd
namespace: http://tinyurl.com/5svlv3
checkbox: checked


--
ttimmers
------------------------------------------------------------------------
ttimmers's Profile: http://forums.novell.com/member.php?userid=26810
View this thread: http://forums.novell.com/showthread.php?t=353268