+

Search Tips   |   Advanced Search

UDDI EJB Interface (Deprecated)


Use the EJB API of the UDDI registry component to publish, find, and delete UDDI entries. However, the UDDI EJB interface is deprecated and supports UDDI version 2 API requests only.

Deprecated feature: The UDDI EJB interface is deprecated in WAS V6.0.depfeat

The client classes that are required for the EJB interface are contained in APP_ROOT/UDDIReg/clients/uddiejbclient.jar. We can read the Java documentation for these classes at the Additional Application Programming Interfaces reference information.

The EJB API is contained in two stateless session beans, one for the inquiry API (com.ibm.uddi.ejb.InquiryBean) and one for the publish API (com.ibm.uddi.ejb.PublishBean), whose public methods form an EJB interface for the UDDI registry. All the public methods on the InquiryBean class correspond to UDDI Version 2 inquiry API functions, and all the public methods on the PublishBean class correspond to UDDI V2 publish API functions. Not all UDDI V2 API functions are implemented, for example get_authToken, discard_authToken, get_businessDetailExt.

In each interface, there are groups of overloaded methods that correspond to the operations in the UDDI 2.0 specification. There is a separate method for each major variation in function. For example, the single UDDI operation find_business is represented by ten variations of findBusiness methods, with different variations to find by name, find by categoryBag argument, and so on.

The arguments for the EJB interface methods are Java objects in thee com.ibm.uddi.datatypes packag. Generally, there is a one-to-one correspondence between classes in this package and elements of the UDDI V2 XML schema. Exceptions to this correspondence are, for example, where UDDI XML elements can be represented by a single String. See the Java documentation for package com.ibm.uddi.datatypes for more information, at Additional Application Programming Interfaces reference information.

The methods on the EJB InquiryBean class map to the EJB inquiry role, and those of the EJB PublishBean class map to the EJB publish role. The EJB inquiry and publish roles protect the EJB interface, as described in Access control for UDDI registry interfaces. If the role mapping is such that a method requires a WAS authenticated user ID, a client program can supply the user ID and password, either when prompted by WAS, or by providing application code that logs in to the default realm using the user ID and password. Use the sas.client.props configuration file to determine how to specify the user ID and password (see Set security with scripting ).

Use the EJB client In this section, it is assumed that both WAS and the UDDI registry are installed, and that they are both running. We cannot use the EJB client from a machine that does not have WAS installed.

  1. Set up the environment to communicate with WAS:

    [AIX] [HP-UX] [Linux] [Solaris]

    . APP_ROOT/bin/setupCmdLine.sh (note the space between the period and APP_ROOT)

    (Windows) APP_ROOT/bin/setupCmdLine.bat

  2. Verify that the CLASSPATH includes the uddiejbclient.jar file (from the APP_ROOT/UDDIReg/clients directory), and the code for the client.

  3. Compile the EJB client programs:

    [AIX] [HP-UX] [Linux] [Solaris]

    $JAVA_HOME/bin/javac -extdirs $WAS_EXT_DIRS:$JAVA_HOME/jre/lib/ext -classpath $WAS_CLASSPATH:$CLASSPATH yourcode.java

    (Windows) %JAVA_HOME%/bin/javac -extdirs $WAS_EXT_DIRS:%JAVA_HOME%/jre/lib/ext -classpath %WAS_CLASSPATH%:%CLASSPATH% yourcode.java

  4. Run the compiled programs:

    [AIX] [HP-UX] [Linux] [Solaris]

    $JAVA_HOME/bin/java -Djava.ext.dirs=$WAS_EXT_DIRS:$JAVA_HOME/jre/lib/ext -Dwas.install.root=$WAS_HOME -Dserver.root=$WAS_HOME $CLIENTSAS $CLIENTSOAP -cp $WAS_CLASSPATH:$WAS_HOME/UDDIReg/clients/uddiejbclient.jar:$CLASSPATH <class name> <args>

    (Windows) %JAVA_HOME%\bin\java -Djava.ext.dirs=%WAS_EXT_DIRS%;%JAVA_HOME%\jre\lib\ext -Dwas.install.root=%WAS_HOME% -Dserver.root=%WAS_HOME% %CLIENTSAS% %CLIENTSOAP% -cp %WAS_CLASSPATH%;%WAS_HOME%\UDDIReg\clients\uddiejbclient.jar:%CLASSPATH% <class name> <args>

Verify the PATH statement starts with APP_ROOT/java/bin.



 

Related tasks


UDDI registry client programming