Subject: Re: Java API: LDAPMessage accessor for LDAPException

From: Rob Weltman <[email-masked]>
Date: Tue, 02 Jan 2001 09:39:29 -0800

Jim Sermersheim wrote:
> 
> Rob,
> 
> There are (perhaps) dozens of extended operations that are not described in Internet-Drafts. Some of these, as well as possible future IETF documented extended operatoins, have the ability to not only return one of the well known (and limited) LDAP error values, but return other "extended" error information as well (in the value of the extended resonse).
> 
> There must be some way of reading the information returned in the extended operation PDU whether or not an error value is present. To make the case more simple, the Java API is not allowing the client to read the entire allowable set of data being sent by the server.
> 
> Jim

  Wouldn't such an extended operation return success as the LDAP return code (the extended operation was successfully delivered, processed, and a result returned), so there would be no exception? There is a difference between an LDAP protocol failure on the one hand and a privately defined operation result on the other.

Rob

> 
> >>> Rob Weltman <[email-masked]> 12/27/00 8:54:52 PM >>>
> Jim Sermersheim wrote:
> >
> > I've heard a couple people ask how to solve this problem with synchronous calls:
> >
> > Client sends an extended operation to server. Server returns with extended response but an error condition is present. An LDAPException is thrown and caught by the application, but there is no way to read the extended response.
> >
> > Can we add a new method to LDAPException -- public LDAPMessage getLDAPMessage()? It would return null if no LDAPMessage is associated with the response.
> >
> > To date I've told people to use the async methods, but I'd rather the problem just be fixed.
> >
> > Jim
> 
> Jim,
> 
>   In what cases is there a valid response message as well as an error condition? For the other operation types there is either one or the other.
> 
> Rob

---

From: Bruce Greenblatt <[email-masked]>
Date: Tue, 02 Jan 2001 09:49:26 -0800

At 09:39 AM 1/2/2001 -0800, Rob Weltman wrote:

>   Wouldn't such an extended operation return success as the LDAP return 
> code (the extended operation was successfully delivered, processed, and a 
> result returned), so there would be no exception? There is a difference 
> between an LDAP protocol failure on the one hand and a privately defined 
> operation result on the other.
>
>Rob
>
>

I concur.  There is a well defined mechanism for extensions to return 
privately defined operation results.  Perhaps this needs to be made more 
explicit in the specification.

==============================================
Bruce Greenblatt, Ph. D.
Directory Tools and Application Services, Inc.
http://www.directory-applications.com
See my new Book on Internet Directories: 
http://www.phptr.com/ptrbooks/ptr_0139744525.html