|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.ibm.di.connector.Connector
com.ibm.di.connector.DSMLv2SOAPConnector
public class DSMLv2SOAPConnector
The DSMLv2 SOAP Connector implements the DSMLv2 standard (http://www.oasis-open.org/committees/dsml/docs/DSMLv2.doc). It is able to execute DSMLv2 requests against a DSML Server. It also provides the option to use DSML SOAP binding.
| Field Summary | |
|---|---|
static String |
ATTR_NAME_HTTP_BODY
An attribute name: "http.body" |
static String |
ATTR_NAME_HTTP_CHARACTER_SET
An attribute name: "characterSet" |
static String |
ATTR_NAME_HTTP_CONTENT_TYPE
An attribute name: "http.Content-Type" |
static String |
ATTR_NAME_HTTP_METHOD
An attribute name: "http.method" |
static String |
ATTR_NAME_HTTP_REMOTE_PASSWORD
An attribute name: "http.remote_pass" |
static String |
ATTR_NAME_HTTP_REMOTE_USER
An attribute name: "http.remote_user" |
static String |
ATTR_NAME_HTTP_SOAPACTION
An attribute name: "http.SOAPAction" |
static String |
ATTR_NAME_HTTP_URL
An attribute name: "http.url" |
static String |
BASE_OBJECT
IBM TDS DSMLv2 String constant. |
static String |
HTTP_BASIC_AUTH
String constant. |
static String |
PARAMETER_AUTH_METHOD
A parameter name: "authenticationMethod" |
static String |
PARAMETER_BINARY_ATTRIBUTES
A parameter name: "binaryAttributes" |
static String |
PARAMETER_PASSWORD
A parameter name: "password" |
static String |
PARAMETER_SEARCH_BASE
A parameter name: "searchBase" |
static String |
PARAMETER_SEARCH_FILTER
A parameter name: "searchFilter" |
static String |
PARAMETER_SEARCH_SCOPE
A parameter name: "searchScope" |
static String |
PARAMETER_SOAPACTION
A parameter name: "soapAction" |
static String |
PARAMETER_SOAPBINDING
A parameter name: "soapbinding" |
static String |
PARAMETER_URL
A parameter name: "url" |
static String |
PARAMETER_USERNAME
A parameter name: "username" |
static String |
SINGLE_LEVEL
IBM TDS DSMLv2 String constant. |
static String |
WHOLE_SUBTREE
IBM TDS DSMLv2 String constant. |
| Fields inherited from class com.ibm.di.connector.Connector |
|---|
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER |
| Constructor Summary | |
|---|---|
DSMLv2SOAPConnector()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
deleteEntry(Entry aEntry,
SearchCriteria aSearch)
This method first look for an attribute with name Dsmlv2Parser.ATTR_NAME_DN in the provided entry if not found it
looks the first criteria in the SearchCriteria object for the same name. |
Entry |
findEntry(SearchCriteria aSearch)
Finds an existing entry. |
Entry |
getNextEntry()
Gets an entry form the resultSet. |
String |
getVersion()
Version information. |
void |
initialize(Object o)
Initializes the connector. |
boolean |
isDeltaSupported()
Delta mode supported. |
void |
modEntry(Entry entry,
SearchCriteria search)
Modifies an existing entry. |
void |
modEntry(Entry entry,
SearchCriteria search,
Entry old)
Modifies an existing entry. |
void |
putEntry(Entry aPutEntry)
Sends the DSML request to the DSML Server. |
Entry |
queryReply(Entry aQueryEntry)
Sends the DSML request to the DSML Server. |
void |
selectEntries()
Initializes the connection with the server and sends a request based on the configured parameters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.ibm.di.connector.ConnectorInterface |
|---|
getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextClient, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isExceptionFatal, isIOException, pushback, queryOperations, querySchema, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminate, terminateServer |
| Field Detail |
|---|
public static final String PARAMETER_URL
public static final String PARAMETER_AUTH_METHOD
public static final String PARAMETER_USERNAME
public static final String PARAMETER_PASSWORD
public static final String PARAMETER_BINARY_ATTRIBUTES
public static final String PARAMETER_SEARCH_BASE
public static final String PARAMETER_SEARCH_FILTER
public static final String PARAMETER_SEARCH_SCOPE
public static final String PARAMETER_SOAPBINDING
public static final String PARAMETER_SOAPACTION
public static final String ATTR_NAME_HTTP_SOAPACTION
public static final String ATTR_NAME_HTTP_URL
public static final String ATTR_NAME_HTTP_METHOD
public static final String ATTR_NAME_HTTP_REMOTE_USER
public static final String ATTR_NAME_HTTP_REMOTE_PASSWORD
public static final String ATTR_NAME_HTTP_BODY
public static final String ATTR_NAME_HTTP_CONTENT_TYPE
public static final String ATTR_NAME_HTTP_CHARACTER_SET
public static final String HTTP_BASIC_AUTH
public static final String BASE_OBJECT
public static final String SINGLE_LEVEL
public static final String WHOLE_SUBTREE
| Constructor Detail |
|---|
public DSMLv2SOAPConnector()
| Method Detail |
|---|
public void initialize(Object o)
throws Exception
initialize in interface ConnectorInterfaceinitialize in class Connectoro - -
ignored
Exception - if the "url" parameter is missing or the
protocol used is neither "http" nor "https".
public void putEntry(Entry aPutEntry)
throws Exception
putEntry in interface ConnectorInterfaceputEntry in class ConnectoraPutEntry - the DSML request as an Entry object, used by the DSMLv2Parser.
Exception - if the distinguish parameter is missing or the DSML Server
replied with an error code.
public Entry queryReply(Entry aQueryEntry)
throws Exception
Entry object.
queryReply in interface ConnectorInterfacequeryReply in class ConnectoraQueryEntry - the DSML request as an Entry object, used by the DSMLv2Parser.
Exception - if the DSML Server replied with an error code.
public void selectEntries()
throws Exception
getNextEntry() could return single entry at a time.
selectEntries in interface ConnectorInterfaceselectEntries in class ConnectorException - if the server responded with an error message.
public Entry getNextEntry()
throws Exception
selectEntries() operation.
getNextEntry in interface ConnectorInterfacegetNextEntry in class ConnectorException - -
neverConnectorInterface.selectEntries()
public Entry findEntry(SearchCriteria aSearch)
throws Exception
Here is an example of how to find all people with names starting with 'J' which are from IBM organization in US.
Example:
var ctor = input.getConnector();
var crit = new com.ibm.di.SearchCriteria("$dn",
com.ibm.di.SearchCriteria.SUBSTRING, "c=US,o=IBM");
crit.addCriteria("name", com.ibm.di.SearchCriteria.INITIAL_STRING, "J");
crit.addCriteria("objectclass", com.ibm.di.SearchCriteria.SUBSTRING, "person");
var res = ctor.findEntry(crit);
if (res != null) {
main.logmsg("Found entry:");
main.dumpEntry(res);
} else {
if( getFindEntryCount()> 1 ){
main.logmsg("Found these entries:");
while ( (entry = ctor.getNextFindEntry()) != null ) {
main.dumpEntry(entry);
}
}
else {
main.logmsg("Entry not found!");
}
}
findEntry in interface ConnectorInterfacefindEntry in class ConnectoraSearch - The search criteria used to locate the entry to be modified
Exception - if an error occurs.
public void modEntry(Entry entry,
SearchCriteria search)
throws Exception
modEntry in interface ConnectorInterfacemodEntry in class Connectorentry - The entry datasearch - The search criteria used to locate the entry to be modified
Exception - if an error occurs.
public void modEntry(Entry entry,
SearchCriteria search,
Entry old)
throws Exception
modEntry in interface ConnectorInterfacemodEntry in class Connectorentry - The entry datasearch - The search criteria used to locate the entry to be modifiedold - The old entry found by the search criteria
Exception - if an error occurs.
public void deleteEntry(Entry aEntry,
SearchCriteria aSearch)
throws Exception
Dsmlv2Parser.ATTR_NAME_DN in the provided entry if not found it
looks the first criteria in the SearchCriteria object for the same name.
If not found an exception is thrown. After the distinguished name is
found the entry is parsed as a DSMLv2 request and sent. If the returned
response indicates that an error had occurred then an exception is
thrown.
deleteEntry in interface ConnectorInterfacedeleteEntry in class ConnectoraEntry - the entry which is the result of the attribute mappingaSearch - the search criteria object.
Exception - if an error while deleting the entry has occurred.public boolean isDeltaSupported()
isDeltaSupported in interface ConnectorInterfaceisDeltaSupported in class Connectorpublic String getVersion()
getVersion in interface VersionInfoInterface
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||