Hello,

I was trying to use the DNConverter within a Javascript function but I
could not manage it to work.
Using validator 1.4.1 I tried

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

importPackage(com.novell.nds.dirxml.driver.DNConve rter);

function parseDN( ) {
return DNConverter.convert("cn=foo,o=bar", "ldap", "slash");
}

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


but I got a

Code:
--------------------
sun.org.mozilla.javascript.internal.EcmaError: TypeError: Cannot call property convert in object [JavaPackage com.novell.nds.dirxml.driver.DNConverter]. It is not a function, it is "object".
--------------------


This one is working neither:

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

importPackage(com.novell.nds.dirxml.driver.DNConve rter);

function parseDN( ) {
var dncv = new com.novell.nds.dirxml.driver.DNConverter;
return dncv convert("cn=foo,o=bar", "ldap", "slash");
}

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

Can anyone give me a hint what's wrong?

Thanks in advance
Robert


--
rhaeber
------------------------------------------------------------------------
rhaeber's Profile: https://forums.netiq.com/member.php?userid=230
View this thread: https://forums.netiq.com/showthread.php?t=56629