directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jess Johnson <>
Subject Retrieving binary data from LDAP server using Groovy
Date Fri, 29 Mar 2013 05:19:07 GMT
I'm having difficulty retrieving binary data from an OpenLDAP server and
was hoping someone could point me in the right direction. I read on the
message board that binary data comes back as incomplete or corrupted unless
the client specifies what attribute is binary.

I wrote similar functionality in another language to test and everything
worked as expected. I'm able to retrieve all other values (Strings) except
binary data.

def ldap ='ldap://,o=Acme')
ldap.eachEntry (filter: 'id=1234567') { entry ->

  def image = entry.image.getBytes()

new File('/var/dir/something.jpg').withOutputStream {
it.write image

Where would I specify the attribute "image" is binary?


View raw message