You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "spark shen (JIRA)" <ji...@apache.org> on 2007/10/11 10:56:50 UTC
[jira] Created: (HARMONY-4928) [classlib][jndi] Implements Ldap
bind operation request and response messages
[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(),
<ldap server ip addr>, 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.
[jira] Updated: (HARMONY-4928) [classlib][jndi] Implements Ldap
bind operation request and response messages
Posted by "spark shen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
spark shen updated HARMONY-4928:
--------------------------------
Attachment: HY-4928.diff
This patch includes implementation for Ldap Bind operation and related test cases. Would any committer take a look?
> [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
> Attachments: HY-4928.diff
>
>
> This patch implements Ldap bind request and response, encodes and decodes them using Harmony
> ASN.1 framework.
> The following code snippet verifies 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 to 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(),
> <ldap server ip addr>, 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.
[jira] Updated: (HARMONY-4928) [classlib][jndi] Implements Ldap
bind operation request and response messages
Posted by "spark shen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
spark shen updated HARMONY-4928:
--------------------------------
Description:
This patch implements 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(),
<ldap server ip addr>, 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());
}
}
was:
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(),
<ldap server ip addr>, 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());
}
}
> [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 implements 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(),
> <ldap server ip addr>, 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.
[jira] Assigned: (HARMONY-4928) [classlib][jndi] Implements Ldap
bind operation request and response messages
Posted by "Leo Li (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leo Li reassigned HARMONY-4928:
-------------------------------
Assignee: Leo Li
> [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
> Assignee: Leo Li
> Attachments: HY-4928.diff
>
>
> This patch implements Ldap bind request and response, encodes and decodes them using Harmony
> ASN.1 framework.
> The following code snippet verifies 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 to 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(),
> <ldap server ip addr>, 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.
[jira] Resolved: (HARMONY-4928) [classlib][jndi] Implements Ldap
bind operation request and response messages
Posted by "Leo Li (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leo Li resolved HARMONY-4928.
-----------------------------
Resolution: Fixed
Hi, Spark:
Patch applied at r584029. Thank you for your improvement. Please verify whether the problem is resolved as you expected.
Good luck!
Leo.
> [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
> Assignee: Leo Li
> Attachments: HY-4928.diff
>
>
> This patch implements Ldap bind request and response, encodes and decodes them using Harmony
> ASN.1 framework.
> The following code snippet verifies 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 to 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(),
> <ldap server ip addr>, 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.
[jira] Updated: (HARMONY-4928) [classlib][jndi] Implements Ldap
bind operation request and response messages
Posted by "spark shen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-4928?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
spark shen updated HARMONY-4928:
--------------------------------
Description:
This patch implements Ldap bind request and response, encodes and decodes them using Harmony
ASN.1 framework.
The following code snippet verifies 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 to 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(),
<ldap server ip addr>, 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());
}
}
was:
This patch implements 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(),
<ldap server ip addr>, 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());
}
}
> [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 implements Ldap bind request and response, encodes and decodes them using Harmony
> ASN.1 framework.
> The following code snippet verifies 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 to 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(),
> <ldap server ip addr>, 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.