[thelist] ColdFusion, LDAP, and binary data
Gilles Vincent
g_vincent at ixo.fr
Tue May 7 08:51:00 CDT 2002
It's normal that the isBinary() returns "no" when you havn't transformed it
yet into a binary object by a WDDX binary deserialization (according to me,
LDAP returns a Base64 représentation of your binary data, ie a WDDX
serialised représentation). So you should try tobinary() first..
not sure, but may help..
- Gilles
complements from the documentation :
--------------------------------------
Base 64
--------
Base 64 provides 6 bit encoding of 8-bit ASCII characters. Because high
ASCII values and binary objects are not safe for transport over internet
protocols such as HTTP and SMTP, ColdFusion offers Base64 as a means to
safely send ASCII and binary data over these protocols. Base 64 allows you
to store binary objects in a database if you convert the data into Base 64
first. If you receive data in Base 64, you can re-create the actual binary
object that it represents, such as a .gif , .jpeg, or executable file, by
using the ToBinary function.
Specification of the "new" binary type (for CF4.5):
--------------------------------------------------
- It is an internal type, consisting of a buffer and a length.
- It is a complex type, assigned by reference.
- It is not automatically convertible to anything.
- Nothing can be automatically converted to it.
- It can be serialized through WDDX, where it is converted to a base64
representation, which consists of printable characters.
- A WDDX binary deserialization, or tobinary() function call will create a
binary object.
----- Original Message -----
From: "Karl Nelson" <knelson at psesd.wednet.edu>
To: <thelist at lists.evolt.org>
Sent: Monday, May 06, 2002 11:33 PM
Subject: Re: [thelist] ColdFusion, LDAP, and binary data
> Thanks to Matt and Nagrom for their quick replies....but the problem isn't
> in converting binary data, its in the fact that the data (which should be
> binary) isn't actually binary. The IsBinary() function returns "No."
> ToString() does nothing. What I get back just isn't binary data...its
> garbage. Something (maybe cfldap) is garbling the response from the LDAP
> server.
>
> Has anyone managed to actually pull usable binary data from an LDAP or
> Active Directory? The two most obvious binary attributes are the
> objectGUID and the objectSID. I'd like to know if its even possible...
>
> thanks,
>
> Karl
>
More information about the thelist
mailing list