Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: LDAPXML: An LDAP to XML Converter

LDAPXML: An LDAP to XML Converter LDAPXML is a set of java classes that allow you to access LDAP entries as custom defined XML. It allows you to map the various LDAP objectClasses and attributes to XML namespaces, attributes, elements etc. If you're lo

Tutorial Details:

LDAPXML uses map files written in XML to map the data. Here's the map file documentation, as well as a sample.

Documentation
Java API Docs
LX Map File Documentation
Custom Conversion hooks

Sample Code
Basic usage:
// connection: A connected LDAP connection
// doc: An XML document
// test.map: A LX map

LXMap map = new LXMap();
map.loadMap("file:///test/test.map");

LXReader reader = new LXReader();
reader.setConnection(connection);
reader.setMap(map);

Element el = reader.retrieveEntry(doc, "cn=test,dc=test,dc=com");
// el now contains a mapped entry
Multiple entries:
LXResults res = reader.retrieveSearch(doc, "dc=test,dc=com", "(objectClass=person)");

// ... either enumerate the results ...
for(int i = 0; i < res.getLength(); i++)
el = res.getResult(i);

// ... or just use them all together ...
doc = res.assembleDocument();
Notes:
Tested on JDK 1.4.2, 1.3.1 and 1.2.
Requires the OpenLDAP/Novell LDAP class library.
ChangeLog


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
LDAPXML: An LDAP to XML Converter

View Tutorial:
LDAPXML: An LDAP to XML Converter

Related Tutorials:

JNDI overview, Part 3: Advanced JNDI - JavaWorld March 2000
JNDI overview, Part 3: Advanced JNDI - JavaWorld March 2000
 
Easy Java/XML integration with JDOM, Part 1 - JavaWorld May 2000
Easy Java/XML integration with JDOM, Part 1 - JavaWorld May 2000
 
Validation with Java and XML Schema, Part 2 - JavaWorld October 2000
Validation with Java and XML Schema, Part 2 - JavaWorld October 2000
 
The art of EJB deployment - JavaWorld August 2001
The art of EJB deployment - JavaWorld August 2001
 
J2EE or J2SE? JNDI works with both
J2EE or J2SE? JNDI works with both
 
Comparison between the two major JDO architectures
Comparison between the two major JDO architectures
 
Finally, getting hands in !
Finally, getting hands in !
 
A simple sample, but interesting enough
A simple sample, but interesting enough
 
Very interesting
Very interesting
 
Java and Security, Part 2
Java and Security The Providers Now we\'ll take a closer look at the different SSPIs that constitute a security realm. We\'ll learn about WebLogic\'s default implementation of these security providers and how to configure them. The default implementat
 
Eye Of Newt - LDAP Editor
Eye Of Newt - LDAP Editor
 
LDAPXML: An LDAP to XML Converter
LDAPXML: An LDAP to XML Converter LDAPXML is a set of java classes that allow you to access LDAP entries as custom defined XML. It allows you to map the various LDAP objectClasses and attributes to XML namespaces, attributes, elements etc. If you're lo
 
Trustin Lee\'s String/Object Converter - Changes
TL-convert Trustin Lee's String/Object Converter provides a simple API to convert Java objects into strings and vice versa. It is developed to replace Jakarta Commons BeanUtils and Jakarta Commons Convert and to provide only String/Object converters.
 
Getting Groovy with XML
XML sucks. Oh, wait, XML rocks. Well, it actually does a lot of both. It rocks because of all of the editors, validators, and tools written for it. XML has all but replaced any notion of a new custom text-based data language. But it also sucks because it\
 
XML Document Validation with an XML Schema
This tutorial explains the procedure of validating an XML document with an XML schema.
 
SLAMD Distributed Load Generation Engine
SLAMD Distributed Load Generation Engine The SLAMD Distributed Load Generation Engine (SLAMD) is a Java-based application designed for stress testing and performance analysis of network-based applications. It was originally developed by Sun Microsystems,
 
Generating an XML Document with JAXB
In this tutorial, JAXB is used to generate Java classes from an XML Schema. An example XML document shall be created from the Java classes.
 
Parsing an XML Document with XPath
The getter methods in the org.w3c.dom package API are commonly used to parse an XML document. But J2SE 5.0 also provides the javax.xml.xpath package to parse an XML document with the XML Path Language (XPath) .
 
Apache Directory Project
ApacheDS is an LDAP and X.500 experimentation platform. Its backend subsystem and frontend are separable and independently embeddable. It provides a server side JNDI LDAP provider that directly interacts with the backend storage. It is powered by SEDA (St
 
Developing Distributed application using Enterprise Java Beans, J2EE Architecture, EJB Tutorial, WebLogic Tutorial.
Developing Distributed application using Enterprise Java Beans, J2EE Architecture, EJB Tutorial, WebLogic Tutorial. Distributed Architecture Two-tier application: In the past two-tier applications were used. Two-tier applications are also know as
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.