Table of contents

Introduction

Development Environment

Web Development and Improvements in user experience

(Productivity and Enterprise-level Application Development Features)

Ajax Overview, [[21759|GeneXus' target='_blank'>Ajax' target='_blank'>Ajax Overview, [[21759|GeneXus and Ajax]]

Business Components

Business Component - Publication as an Enterprise Java Bean

Practical course: Bluesky Charters
 

Application Localization

Application Localization
Demo
Translation Tool
Help "in any language"
Practical course: Bluesky Charters
 

Patterns

About this topic
Patterns based development
Description
Built in Patterns
Work With Pattern
Demo: Work With Pattern
Practical course: Patterns
 

Better data model

Null handling optimizes navigations
Nulls property

 

User experience

New options on rightclick in win
 

Reverse Engineering

Database Reverse Engineering Tool
 

New Platforms

MySQL
.Net Mobile Generator
More J2EE support than ever
 

Data Types and Methods

Message Queue handling data types

DirectoryDataType
LDAP Data Type

URL access Property
New IIF function
New byte count function
New Methods for attributes, variables and enumerated domains!
XSLTApply Method
Procedures can now call web objects
Web Services: Grouping Locations
News about model, object, and control properties


Unofficial Content
  • This documentation is valid for:

LDAP data type


Scope

Objects: Procedures, Transactions, Work Panels, Web Panels
Languages: Java, .NET
Interfaces: Web, Win


Introduction


LDAPClient data type is a new GeneXus type that allows connecting to LDAP servers. It can be used to authenticate users or retrieve attributes under a specified context.

Description


Properties

Server Specifies the LDAP connection server
Port Specifies LDAP port
AuthenticationMethod Specifies the authentication method: Simple, Anonymous, SASL
User Specifies the user to be authenticated
Password Specifies the user connection password


Methods


Connect Connects to the LDAP server
Disconnect Terminates the LDAP connection
GetAttribute Retrieves attributes under a specified context


Connect

Creates the connection to the LDAP server at the specified host, port and using the specified authentication method. Optionally if user and password were specified they will be used to create the connection.

Returned Values

Numeric: 1 successfully connected, 0 couldn't connect to server.


Example

&ldapClient.Host = 'myServer'
&ldapClient.Port = 389
&ldapClient.AuthenticationMethod = 'simple'
&ldapClient.User = 'myUser'
&ldapClient.Password = 'myPassword'
 
&ret = &ldapClient.Connect()


Disconnect


Terminates the connection with the server.

Example:

& ldapClient.Disconnect()


GetAttribute(String AttName, String context, Properties props)

Return the values of the "AttName" attribute defined by a context and a set of attributes.

Example:

&MatchAtts->Properties

&MatchAtts.set("uid", "John")
for &auxString in &ldapClient.GetAttribute("mail", "ou=People, o=myserver", &MatchAtts)
msg(&auxString)
endfor

See Properties data type.

Considerations

  • Java: Information about SASL Authentication: http://java.sun.com/products/jndi/tutorial/ldap/security/sasl.html.
  • Java: Information about LDAP Authentication here: http://java.sun.com/products/jndi/tutorial/ldap/security/auth.html
  • Java: To use LDAPClient data type in Java, Sun Virtual Machine must be used. 
  • Java: Microsoft Virtual Machine doesn´t have native support for it. However it is possible to use LDAPClient (*just authenticate users) with Microsoft VM, if JNDI 1.1.2 is downloaded (JNDI 1.1.2 Class Libraries, LDAP Service Provider, 1.0.3) (http://java.sun.com/products/jndi/downloads/index.html). After that, jndi.jar, ldap.jar, providerutil.jar must be added to classpath.  When using Microsoft VM it will be possible to authenticate users but it won't be possible to retrieve attributes.
  • When specifying a context (when retrieving attributes for example) it is important to take into account that contexts are different depending on the directory tree structure and depending on the LDAP server. For example when using Netscape Server a possible context could be:

    uid = John, ou = People, dc = myCompany, dc = com

    When using Active Directory an example could be:

    cn = John, ou = Users , dc = myCompany, dc = com

    So it is very important to know that the context being used matches the server's directory tree structure in order to get correct results.


Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant