Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 92959 invoked from network); 16 Oct 2007 08:25:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Oct 2007 08:25:13 -0000 Received: (qmail 36108 invoked by uid 500); 16 Oct 2007 08:25:01 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 36094 invoked by uid 500); 16 Oct 2007 08:25:01 -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 36085 invoked by uid 99); 16 Oct 2007 08:25:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Oct 2007 01:25:01 -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; Tue, 16 Oct 2007 08:25:10 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 92C957141EB for ; Tue, 16 Oct 2007 01:24:50 -0700 (PDT) Message-ID: <63958.1192523090587.JavaMail.jira@brutus> Date: Tue, 16 Oct 2007 01:24:50 -0700 (PDT) From: "spark shen (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-4949) [classlib][ldap] Add ldap delete request sending and delete response parsing function In-Reply-To: <32117125.1192521890595.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-4949?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] spark shen updated HARMONY-4949: -------------------------------- Attachment: HY-4949.diff This patch provides the implementation for ldap delete operation and associated test case. > [classlib][ldap] Add ldap delete request sending and delete response parsing function > ------------------------------------------------------------------------------------- > > Key: HARMONY-4949 > URL: https://issues.apache.org/jira/browse/HARMONY-4949 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: spark shen > Attachments: HY-4949.diff > > > Ldap delete operation is used to delete a designated entry in a ldap server. This patch provides the support to sending delete request and parsing delete response from ladp server. > Here is the sample code to execute delete operation. > 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.DeleteOp; > 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 { > // change to your ldap server address > LdapClient client = new LdapClient(SocketFactory.getDefault(), > "IP address", 389); > > try { > DeleteOp del = new DeleteOp( > "o=harmony7,c=china,dc=my-domain,dc=com"); > response = client.doOperation(del, null); > System.out.println("************response*************"); > System.out.println(response.getMessageId()); > re = del.getResult(); > System.out.println(re.getErrorMessage()); > System.out.println(re.getMachedDN()); > System.out.println(re.getResultCode()); > System.out.println(re.getReferrals()); > } catch (Exception e) { > e.printStackTrace(); > } > } > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.