DSML-LDAP is a Perl module to make LDAP operation using DSML-RPC module.
SYNOPSIS
use HTTP::Daemon;
use HTTP::Status;
use DSML-LDAP;
my $httpd = HTTP::Daemon->new || die;
print "Please contact me at: n";
while (my $c = $httpd->accept) {
while (my $r = $c->get_request) {
if ($r->method eq 'POST') {
my $req = $r->content;
$xml = DSML-LDAP::handle($req);
....
# Build HTTP response
....
$httpd->send_response($response);
}
else {
$httpd->send_error(RC_FORBIDDEN);
}
}
}
This module use DSML-RPC to parse XML and Net::LDAP to perform operation on a LDAP Server. In the example below I use HTTP protocol to transport DSML request and response.
METHODS
handle
Receive DSML request, parse it using DSML-RPC, perform operation and return DSML result.
doBind
Perform bind operation on LDAP server specified in the request.
doSearch
Perform search operation on a LDAP server using information contained in DSML::Request object
doModify
Perform modify operation on a LDAP server using information contained in DSML::Request object
doAdd
Perform add operation on a LDAP server using information contained in DSML::Request object
doDelete
Perform delete operation on a LDAP server using information contained in DSML::Request object
doModifyDN
Perform modifyDN operation on a LDAP server using information contained in DSML::Request object
doCompare
Perform compare operation on a LDAP server using information contained in DSML::Request object
Product's homepage
Requirements:
· Perl