harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "spark shen (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4949) [classlib][ldap] Add ldap delete request sending and delete response parsing function
Date Tue, 16 Oct 2007 08:04:50 GMT
[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

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 {
    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(

            response = client.doOperation(del, null);
            re = del.getResult();
        } catch (Exception e) {

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message