The first thing I would do is CFDUMP the LDAP query.  That will show you
what you are getting back from the CFLDAP tag.

It is possible to store different types of items in an LDAP directory.
Our Active Directory stores binary information related to our voicemail
system.

However, if you are only using uid and displayName, I don't see where
the problem lies.  CFDUMP will help.

M!ke 

-----Original Message-----
From: Joelle Tegwen [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 25, 2006 10:38 AM
To: CF-Talk
Subject: Ldap --> structure = Not String and Not Object

I posted this on the newbie list and didn't get much of a response so
I'm trying here. 

The goal is to take the ldap response and move it from a query object
into a structure. I'm searching on a primary key so I know I'll only get
0 or 1 responses.

My code says this:
<cfldap action="QUERY" attributes="uid,displayName" name="ldap"
scope="SUBTREE" start="o=University of Minnesota, c=US"
filter="(&(cn=*#x500ID#*))" server="ldap.umn.edu" port="389" >

<cfloop list="#ldap.ColumnList#" index="column">
        <cfset thisColumn="#column#">
        <cfset args["#thisColumn#"]=ldap["#thisColumn#"] />
        <cfoutput>#args[thisColumn]#</cfoutput> <!--- for debugging --->
</cfloop>

Which gives me this error: "Complex object types cannot be converted to
simple values."

And I said "huh, I didn't expect that to be an object" So I asked a
friend of mine and he suggested adding the "##" and maybe putting the
column in the variable name because he found CF to be a bit buggy in
situations like these. So I tried:

<cfloop list="#ldap.ColumnList#" index="column">
        <cfset thisColumn="#column#">
        <cfset args["#thisColumn#"]=ldap["#thisColumn#"] />
        <cfoutput>#args[thisColumn]#</cfoutput> <!--- for debugging --->
</cfloop>

I get the same error. So I say "fine be that way" and I try this:

<cfloop list="#ldap.ColumnList#" index="column">
        <cfset thisColumn="#column#">
        <cfset args["#thisColumn#"]=ldap["#ldap[thisColumn.value]#"] />
        <cfoutput>#args[thisColumn]#</cfoutput> <!--- for debugging --->
</cfloop>


Then the error is: "You have attempted to dereference a scalar variable
of type class java.lang.String as a structure with members."

Which (seems to me) to be a direct contradiction of the previous error. 
How do I make this work?

Thanks in advance
Joelle Tegwen

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238624
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to