Return-Path: X-Original-To: apmail-directory-api-archive@minotaur.apache.org Delivered-To: apmail-directory-api-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EA5A510D0A for ; Thu, 25 Jul 2013 00:06:52 +0000 (UTC) Received: (qmail 81649 invoked by uid 500); 25 Jul 2013 00:06:52 -0000 Delivered-To: apmail-directory-api-archive@directory.apache.org Received: (qmail 81621 invoked by uid 500); 25 Jul 2013 00:06:52 -0000 Mailing-List: contact api-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: api@directory.apache.org Delivered-To: mailing list api@directory.apache.org Received: (qmail 81613 invoked by uid 99); 25 Jul 2013 00:06:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jul 2013 00:06:52 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of elecharny@gmail.com designates 74.125.82.48 as permitted sender) Received: from [74.125.82.48] (HELO mail-wg0-f48.google.com) (74.125.82.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Jul 2013 00:06:46 +0000 Received: by mail-wg0-f48.google.com with SMTP id f12so408556wgh.3 for ; Wed, 24 Jul 2013 17:06:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=XcSAzFf5AvItjxnim7AHwMRyBsmYU+6Y3iu/T7kCj1I=; b=NOFYGhlSGV6qC2mA7aAcncgBCLJXuhec5N1n4tTYGbUCU6KwsfGM6RquEbu3R0+k9B zp4+/HQE0925hptyRR3+dA4QKQwpWhdcpY2oxPRZaIpbIY5oq3qxKFn438kelKfwj7YT hTJzzyjon59cLXizpPARrAL6To0ZqnqSWdvy9HxiG6X2mRWwFM3BQipmUKY9jQtz1b31 9rSumY714WOnIKKKwIFnCbRz59xigqAEH+L7AOnmBdv1JVEIWQxieBB1+noLtq++aZWY QM2omz+cg4lUDiX1zxxpiRKhj0sDjgVrvNqzRnbokfXe9IjLnvCy439b0u4FABF0LL7M Dkng== X-Received: by 10.180.20.4 with SMTP id j4mr35393wie.48.1374710389980; Wed, 24 Jul 2013 16:59:49 -0700 (PDT) Received: from Emmanuels-MacBook-Pro.local (ran75-1-78-192-106-184.fbxo.proxad.net. [78.192.106.184]) by mx.google.com with ESMTPSA id b20sm139002wiw.4.2013.07.24.16.59.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 24 Jul 2013 16:59:49 -0700 (PDT) Message-ID: <51F06A74.7070009@gmail.com> Date: Thu, 25 Jul 2013 01:59:48 +0200 From: =?UTF-8?B?RW1tYW51ZWwgTMOpY2hhcm55?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: api@directory.apache.org Subject: Re: fixing the "5 minute example" page References: <090c01ce88a2$9e422ea0$dac68be0$@idfconnect.com> In-Reply-To: <090c01ce88a2$9e422ea0$dac68be0$@idfconnect.com> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Many thanks, Richard ! Page ficed (will probably take a few minutes to be visible as the mirrors get to be updated too). We really appreciated those corrections ! Le 7/24/13 9:18 PM, Richard Sand a écrit : > Hi all - this is the first time I’m using the Apache DS API, migrating over from the JNDI and Netscape libraries. > > The "5 minute example" page has several errors on it, I'm guessing because it hasn't been updated for the 2.0 API. > > Here's what I've found (not trying to nitpick, but it's probably worth fixing now - just that whole "first impression" notion...) > > The connection example is incorrect on how to create an LdapConnection, since that is an interface. It should instead read: > > LdapConnection connection = new LdapNetworkConnection( "localhost", 389 ); > > Also the search method returns a different object now: > > EntryCursor cursor = connection.search("ou=system", "(objectclass=*)", SearchScope.ONELEVEL, "*"); > > while (cursor.next()) { > Entry nextEntry = cursor.get(); > // process the entry... > } > > Best regards, > > Richard > > > > -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com