Hi folks,

It's been a while!

I have an interesting scenario whereby I want to stop a JDBC driver
using policy.

I am aware that dirxml_misc.jar contains a package
com.novell.nds.dirxml.ldap. This package contains a class
StopDriverRequest.

I've tried calling this by doing:


Code:
--------------------
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE policy PUBLIC "policy-builder-dtd" "C:\Program Files (x86)\Novell\Designer\plugins\com.novell.idm.polic ybuilder_4.0.0.201401071232\DTD\dirxmlscript4.0.2. dtd"><policy xmlns:shim="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.ldap">
<rule>
<description>Stop Driver</description>
<conditions>
<and/>
</conditions>
<actions>
<do-set-local-variable name="lvStop" scope="policy">
<arg-string>
<token-xpath expression="shim:StopDriverRequest($dirxml.auto.dr iverdn)"/>
</arg-string>
</do-set-local-variable>
</actions>
</rule>
</policy>
--------------------


However when I trigger the code with this document via console two:


Code:
--------------------
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.0.2.0">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<status event-id="0" level="success"></status>
</output>
</nds>
--------------------


I get this back:


Code:
--------------------
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.0.2.0">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<status level="error">Code(-9131) Error in vnd.nds.stream://402TEST/system/driverset1/Maintenance+Driver/Subscriber/Test+Stop#XmlData:10 : Error evaluating XPATH expression 'token-xpath("shim:StopDriverRequest($dirxml.auto.driverd n)")' : com.novell.xml.xpath.XPathEvaluationException: function 'shim:StopDriverRequest' not found.</status>
</output>
</nds>
--------------------


Interestingly I don't see that in the trace though:


Code:
--------------------
<nds dtdversion="4.0" ndsversion="8.x">
<source>
<product edition="Advanced" version="4.0.2.0">DirXML</product>
<contact>Novell, Inc.</contact>
</source>
<output>
<status event-id="0" level="success"/>
</output>
</nds>
[03/28/14 16:01:05.195]:Maintenance Driver ST:Applying policy: %+C%14CTest Stop%-C.
[03/28/14 16:01:05.195]:Maintenance Driver ST: Applying to status #1.
[03/28/14 16:01:05.195]:Maintenance Driver ST: Evaluating selection criteria for rule 'Stop Driver'.
[03/28/14 16:01:05.195]:Maintenance Driver ST: Rule selected.
[03/28/14 16:01:05.195]:Maintenance Driver ST: Applying rule 'Stop Driver'.
[03/28/14 16:01:05.197]:Maintenance Driver ST: Action: do-set-local-variable("lvStop",scope="policy",token-xpath("shim:StopDriverRequest($dirxml.auto.driverd n)")).
[03/28/14 16:01:05.201]:Maintenance Driver ST: arg-string(token-xpath("shim:StopDriverRequest($dirxml.auto.driverd n)"))
[03/28/14 16:01:05.205]:Maintenance Driver ST: token-xpath("shim:StopDriverRequest($dirxml.auto.driverd n)")
[03/28/14 16:01:18.230]:Maintenance Driver PT:Receiving DOM document from application.
[03/28/14 16:01:18.230]:Maintenance Driver PT:
<nds dtdversion="4.0">
<source>
<product instance="Maintenance Driver" version="4.0.2.0">DirXML Null Driver</product>
<contact>Novell, Inc.</contact>
</source>
<input>
<status level="success" type="heartbeat"/>
</input>
</nds>
[03/28/14 16:01:18.232]:Maintenance Driver PT:No input transformation policies.
[03/28/14 16:01:18.232]:Maintenance Driver PT:No schema mapping policies.
[03/28/14 16:01:18.233]:Maintenance Driver PT:Resolving association references.
[03/28/14 16:01:18.233]:Maintenance Driver PT:No event transformation policies.
[03/28/14 16:01:18.234]:Maintenance Driver PT:Applying publisher filter.
[03/28/14 16:01:18.234]:Maintenance Driver PT:Publisher processing status for .
[03/28/14 16:01:18.235]:Maintenance Driver PT:No command transformation policies.
[03/28/14 16:01:18.235]:Maintenance Driver PT:Filtering out notification-only attributes.
[03/28/14 16:01:18.235]:Maintenance Driver PT:Pumping XDS to eDirectory.
[03/28/14 16:01:18.236]:Maintenance Driver PT:Performing operation status for .
[03/28/14 16:01:18.236]:Maintenance Driver PT:
DirXML Log Event -------------------
Driver: \402TEST\system\driverset1\Maintenance Driver
Channel: Publisher
Status: Success

--------------------


Anyone any thoughts on where I am going wrong here?

Many thanks

Jim


--
jimgoodall
------------------------------------------------------------------------
jimgoodall's Profile: https://forums.netiq.com/member.php?userid=1203
View this thread: https://forums.netiq.com/showthread.php?t=50394