Return-Path: Delivered-To: apmail-directory-users-archive@www.apache.org Received: (qmail 21834 invoked from network); 2 Mar 2009 10:45:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Mar 2009 10:45:03 -0000 Received: (qmail 938 invoked by uid 500); 2 Mar 2009 10:45:03 -0000 Delivered-To: apmail-directory-users-archive@directory.apache.org Received: (qmail 775 invoked by uid 500); 2 Mar 2009 10:45:02 -0000 Mailing-List: contact users-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@directory.apache.org Delivered-To: mailing list users@directory.apache.org Received: (qmail 763 invoked by uid 99); 2 Mar 2009 10:45:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Mar 2009 02:45:02 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of elecharny@gmail.com designates 209.85.219.170 as permitted sender) Received: from [209.85.219.170] (HELO mail-ew0-f170.google.com) (209.85.219.170) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Mar 2009 10:44:52 +0000 Received: by ewy18 with SMTP id 18so2020591ewy.25 for ; Mon, 02 Mar 2009 02:44:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=La44dEczB8VjB88Uk8+6HeyfhWikdNPPapsZX7Gross=; b=W92ZousZCdcY0gMb/2IX1iiMu1dsP21sj4jAXOTyLKzVhVlkkmn9K9aLMjgjLrjkrC 2h/A67kNrHXCwbCSO+O17tnh1CZET8V0Mun3QxSnRmRD8JbMsSa35gHDFCuPbqvbecCd 81ppFkSP6YXwAn6ZDaNEMgvS/SQ3fJ0xwwoCU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=sRcr7fgSj/t5D1lcefhXPKzKh30jdgMhPZpI6EAJV9GRjMYIhIGt8sHybyyNHw0xxk 8DE+/rGuevv1Zj/0gKdsFD6Il+jXCbSl6ihXeod+FjZJG7kdYKU7Q2K3DMLeDCkf4AL8 yfQn3PhS2uFjy9z1dbtzhuiybfMghwaBIQkRs= Received: by 10.210.104.20 with SMTP id b20mr4648551ebc.85.1235990672369; Mon, 02 Mar 2009 02:44:32 -0800 (PST) Received: from ?192.168.0.11? ([78.226.4.211]) by mx.google.com with ESMTPS id 28sm7161041eye.59.2009.03.02.02.44.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 02 Mar 2009 02:44:31 -0800 (PST) Sender: Emmanuel Lecharny Message-ID: <49ABB88E.5090809@nextury.com> Date: Mon, 02 Mar 2009 11:44:30 +0100 From: Emmanuel Lecharny User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: users@directory.apache.org Subject: Re: How to bind and search binary data in Apache DS? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Sudheer Kumar wrote: >>> 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. > We had that in ApacheDS 1.0, but we removed it, as we have a better way to detect if the attribute is binary or not. All our attributes are now defined as either String or Binary internally. When you define a new AttributeType, you have to define it as binary if you want it to be binary (the defaukt is String, AFAIR). > 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? I have no idea. Can you post the code you are using to demonstrate what you observe ? -- -- cordialement, regards, Emmanuel L�charny www.iktek.com directory.apache.org