directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sudheer Kumar <sudheerarim...@gmail.com>
Subject Re: How to bind and search binary data in Apache DS?
Date Mon, 02 Mar 2009 10:18:50 GMT
>>As you are using JNDI you need to specify your attribute as binary.>>Either use
the ;binary option or put your attribute to the>>"java.naming.ldap.attributes.binary"
environment property. See [1] for>>more information.
>>Kind Regards,>>Stefan
>>[1] http://java.sun.com/products/jndi/tutorial/ldap/misc/attrs.html

------------------ Thanks for the information. However, what I want is to
store a String (an xml data) in the form of binary in Apache Directory
Server.  I used to store the same in Sun one and Tivoli and was successful.
 With Them I can simply bind String content to binary attributes and
retrieve them as String. I don't have to do anything at the client side.  I
need it because my xml content will be more than 64KB at times.   Is there
any setting in the server.xml for binary attributes? if so please give me a
sample or a link.    I used the "java.naming.ldap.attributes.binary" option
in JNDI and was able to get the byte array (an image I stored). What I want
is a similar setting where I would try to bind a String to an attribute
whose types is binary.

I tried storing a sample byte array as follows: 'byte[] newValue = new
byte[]{0x00, 0x01, 0x02, 0x03};' It was successful but, when I tried the
following:
byte[] newValue = new byte[]{0x3C, 0x3F, 0x78, 0x6D, 0x6C, 0x20} it
FAILED!?? Why? What is the difference between the the first byte array and
second? So Apache DS read the content of the byte array and do some
filtering?

If I need to do any conversion at the client side what conversion do I need
to do? Please give an example. Or do I need to write a plug-in for this?

Thanks in Advance.
SudheerKumar

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message