I have created a simple java class in ecplise that looks like the
following:

package gpnz;

public class Testing {

public String returnString() {
return "returnValue";
}
}

Obviously, I am just trying to return a string value to test calling
Java. I compiled it using Windows 7 with JDK1.5. I used the Ecplise
functionality to create a non-compressed jar file.

I copy the jar file to /opt/novell/eDirectory/lib/dirxml/classes and
restart my edirectory on that server (same server driver runs on). RH
Linux with java 1.4.2 installed

My code to call the function is as follows:

<?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_3.5.0.201003011501\DTD\dirxmlscript3.6.1. dtd"><policy
xmlns:return="http://www.novell.com/nxsl/java/gpnz.Testing">
<rule>
<description>test</description>
<comment xml:space="preserve">test</comment>
<conditions>
<and/>
</conditions>
<actions>
<do-set-local-variable name="lvTest" scope="policy">
<arg-string>
<token-xpath expression="return:returnString()"/>
</arg-string>
</do-set-local-variable>
<do-trace-message>
<arg-string>
<token-local-variable name="lvTest"/>
</arg-string>
</do-trace-message>
<do-veto/>
</actions>
</rule>
</policy>.

However, when this code is hit, I get the following error:

DirXML Log Event -------------------
Driver: \CORE-IDV-DEV\SERVICES\DRV\DriverSet\GRID_AD
Channel: Subscriber
Status: Error
Message: Code(-9131) Error in
vnd.nds.stream://CORE-IDV-DEV/SERVICES/DRV/DriverSet/GRID_AD/Subscriber/TimTestPolicy#XmlData:11
: Error evaluating XPATH expression
'token-xpath("return:returnString()")' :
com.novell.xml.xpath.XPathEvaluationException: No extension function
found for 'return:returnString()'.
[05/17/12 09:36:04.662]:GRID_AD ST:
DirXML Log Event -------------------
Driver: \CORE-IDV-DEV\SERVICES\DRV\DriverSet\GRID_AD
Channel: Subscriber
Status: Error
Message: Code(-9083) Error submitting event to subscriber:
Code(-9131) Error in
vnd.nds.stream://CORE-IDV-DEV/SERVICES/DRV/DriverSet/GRID_AD/Subscriber/TimTestPolicy#XmlData:11
: Error evaluating XPATH expression
'token-xpath("return:returnString()")' :
com.novell.xml.xpath.XPathEvaluationException: No extension function
found for 'return:returnString()'.


--
TR011837
------------------------------------------------------------------------
TR011837's Profile: http://forums.novell.com/member.php?userid=114686
View this thread: http://forums.novell.com/showthread.php?t=455971