I'm attempting to use Novell's ActiveX components to query and update their eDirectory 
LDAP server.  
The problem I'm having is that extra characters are being added to the objects 
attributes when they are being passed between objects.  In this instance.  I 
instantiate the NWIDIRQuery object to search the LDAP directory for the object I want 
to modify.  I then pass the resulting query Object to the NWIDIREntries object that I 
use to modify the entry and then post the changes back to the eDirectory server.  The 
problem I'm running into is that about 50 percent of the time when the query object is 
passed to the Entries object extra characters are being appended to the values, so 
that they no longer equal what is on the server.  For example:

In the query object the value in the first array position of attribute groupMembership 
is
"cn=Everyone,ou=IS,ou=MET,o=VMMC" in the Entries the value becomes
"cn=Everyone,ou=IS,ou=MET,o=VMMC????".  

Subsequent fields have extra values appended as well.  This occurs on CF5 running NT4 
and CFMX running on W2K. 

Connecting to Novell eDirectory using Novell's activeX components: 
Novell Internet Directory Query Control and Novell Internet Directory Entries Control
(available at http://developer.novell.com/ndk/activex-index.htm).

Any insight would be appreciated.
-Eric D.

Here's a piece of the code I'm running:


<cfscript>
        Results = "";
        cn = TRIM(attributes.cn);
        if (TRIM(attributes.filter) EQ "")
                filter = "(&(objectClass=inetOrgPerson)(cn=#cn#))"; // 
        else
                filter = "#attributes.filter#"; 
        SearchScope = 2; // 2 Searches the base object specified in the FullName 
property. 
                                         // 1 Searches entries subordinate to the 
entry given in the search base.
                                         // 0 Searches the entire sub-tree. This is 
below the entry given in the search base.                                    
        SearchMode = 0;  // 0 synchronous search
                                         // 1 asynchronous search
        UserName = "LDAP://#attributes.server#/#attributes.serverUserName#";;    // 
account used to connect to ldap server
        password = "#attributes.serverPassword#";                                      
                         // password for above account
        if (TRIM(attributes.fullName) EQ "")
                FullName = "ldap://#attributes.server#/#attributes.root#";;             
         // base from which to start the search
        else 
                FullName = "#attributes.fullName#";                                    
                                 // if user full name or dn is known use that
</cfscript>     

<!--- Create instance of object NWIDirQueryLib.NWQueryResult --->
<cfobject type="com" name="NWIDirQ1" class="NWIDirQueryLib.NWIDirQuery.1.2" 
action="CREATE" context="INPROC">

<cfscript>
        NWIDirQ1.FullName = "#FullName#";
        NWIDirQ1.UserName = "#UserName#";
        NWIDirQ1.Password = "#password#";
        NWIDirQ1.Credentials = "c:\cfusionmx\ldap\rootcert.der"; //if secure is true
        NWIDirQ1.SecureConnection = false;
        
        NWIDirQ1.Fields = "#attributes.fields#";
        NWIDirQ1.Filter = "#filter#"; //   
        NWIDirQ1.SearchScope = #SearchScope#;  // 2 means entire sub-tree
        NWIDirQ1.SearchMode = #SearchMode#;   // 0 means synchronous search, i.e. 
        
        conn = NWIDirQ1.Connect();
        q1Results = NWIDirQ1.Search();
        conn = NWIDirQ1.Disconnect();
        aCount = q1Results.Count;               
</cfscript>

<!--- Create Entries object and pass query Object results to it --->
<cfobject type = "com"
                  action = "create"
                  class = "NWIDirEntriesLib.NWIDirEntries.1.1"
                  name = "NWIDirE1">
        
<cfscript>
        NWIDirE1.FullName = "#FullName#";
</cfscript>
<cfscript>
        NWIDirE1.UserName = "#UserName#"; //cn=ldapadmin
        NWIDirE1.Password = "#Password#";       //adminldap
        NWIDirE1.Credentials = "c:\cfusionmx\ldap\rootcert.der"; // if secure is true
        NWIDirE1.SecureConnection = false;

        // Now lets get the user's first name and last name
        NWIDirE1.Fields = attributes.fields;
        NWIDirE1.Connect();

        // don't return results until finished.
</cfscript>
<cfscript>      
        Entries = NWIDirE1.Entries(); //
        Entries = NWIDirE1.Entries(q1Results);
        eCount   = Entries.Count;
</cfscript>

<cfloop index = "LoopCount" from = "0" to = #countZero#>
        <cfscript>
        Entry   = Entries.Item(#Loopcount#);
        Shortname = Entry.ShortName;
                Fullname  = Entry.FullName;
                Layout    = Entry.Layout;               
                groupMembership = Entry.GetFieldValue("groupMembership");
                securityEquals = Entry.GetFieldValue("securityEquals");
        </cfscript>
        ...
</cfloop>
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to