[Date Prev][Date Next] [Chronological] [Thread] [Top]

LDAP URL - what format is it in? How to decode an LDAP URL with a Java servlet?

(Already posted to the java.sun forum, without much success.)

I have a socket-based Java servlet listening for LDAP requests 
(e.g. ldap://localhost:389/o=ldap.valinf.com??sub?(sn=M*)), but 
I want to use the passed request to search on a different type 
of DB instead of an LDAP server. My problem is that, when a 
request is received and I read it using getInputStream, it isn't 
a string.  Reading in the example above using a 
"int data=getInputStream().read();" loop, I get 22 bytes back: 
48 132 0 0 0 16 2 1 2 96 132 0 0 0 7 2 1 3 4 0 128 0.

I expected to read in a string containing 
"o=ldap.valinf.com??sub?(sn=M*)" - what might I be missing here? 
Is the URL automatically encoded before it gets to the Java code? 
If anyone could point me in the right direction, your help would 
be appreciated.


Trevor Maxted, VALID Information Systems
e-mail: tmaxted@valinf.com
All of the opinions and views expressed in this message are the 
personal views of the sender