Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 56160 invoked from network); 11 Oct 2007 08:57:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Oct 2007 08:57:11 -0000 Received: (qmail 51558 invoked by uid 500); 11 Oct 2007 08:56:59 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 51537 invoked by uid 500); 11 Oct 2007 08:56:59 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 51528 invoked by uid 99); 11 Oct 2007 08:56:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Oct 2007 01:56:59 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Oct 2007 08:57:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9340771420A for ; Thu, 11 Oct 2007 01:56:50 -0700 (PDT) Message-ID: <28108847.1192093010590.JavaMail.jira@brutus> Date: Thu, 11 Oct 2007 01:56:50 -0700 (PDT) From: "spark shen (JIRA)" To: commits@harmony.apache.org Subject: [jira] Created: (HARMONY-4928) [classlib][jndi] Implements Ldap bind operation request and response messages MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [classlib][jndi] Implements Ldap bind operation request and response messages ----------------------------------------------------------------------------- Key: HARMONY-4928 URL: https://issues.apache.org/jira/browse/HARMONY-4928 Project: Harmony Issue Type: New Feature Components: Classlib Reporter: spark shen This patch implemnts Ldap bind request and response, encode and decode them according to Harmony ASN.1 framework. The following main function can test the implementation: import java.io.IOException; import java.net.UnknownHostException; import javax.net.SocketFactory; import org.apache.harmony.jndi.provider.ldap.BindOp; import org.apache.harmony.jndi.provider.ldap.LdapClient; import org.apache.harmony.jndi.provider.ldap.LdapMessage; import org.apache.harmony.jndi.provider.ldap.LdapResult; /** * This class demonstrate how to connect and send BindRequest to Ldap server. */ public class Sample { @SuppressWarnings("unused") public static void main(String[] args) throws UnknownHostException, IOException { // anonymous binds BindOp bind = new BindOp("cn=Coder,dc=InitialDN", "secret"); // Initialize to your ldap server address LdapClient client = new LdapClient(SocketFactory.getDefault(), , 389); LdapMessage response = client.doOperation(bind, null); System.out.println(response.getMessageId()); LdapResult re = bind.getResult(); System.out.println(re.getErrorMessage()); System.out.println(re.getMachedDN()); System.out.println(re.getResultCode()); System.out.println(re.getReferrals()); } } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.