Using the UDDI EJB Interface (Deprecated)

Use the Enterprise JavaBeans (EJB) application programming interface (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.

Before you begin

Both WebSphere® Application Server and the UDDI registry must be installed, and must both be running. You cannot use the EJB client from a machine that does not have WebSphere Application Server installed.

About this task

Deprecated feature: The UDDI EJB interface is deprecated in WebSphere Application Server Version 6.0.depfeat

The client classes that are required for the EJB interface are contained in app_server_root/UDDIReg/clients/uddiejbclient.jar. For the Java™ documentation for these classes, see the information about additional APIs.

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 Version 2 publish API functions. Not all UDDI Version 2 API functions are implemented, for example get_authToken, discard_authToken, and 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 arguments such as name or categoryBag.

The arguments for the EJB interface methods are Java objects in the com.ibm.uddi.datatypes package. Generally, there is a one-to-one correspondence between classes in this package and elements of the UDDI Version 2 XML schema. There are exceptions to this correspondence, for example, where UDDI XML elements can be represented by a single string. For more information, see the Java documentation for the package com.ibm.uddi.datatypes in the information about additional APIs.

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 information about access control for UDDI registry interfaces. If the role mapping is such that a method requires a WebSphere Application Server authenticated user ID, a client program can supply the user ID and password, either when prompted by WebSphere Application Server, 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 when you configure security.

To use the EJB client, use the following steps.

Procedure

  1. Set up your environment to communicate with WebSphere Application Server: [AIX] [HP-UX] [Linux] [Solaris]
    . app_server_root/bin/setupCmdLine.sh
    [Windows]
    app_server_root/bin/setupCmdLine.bat

    [AIX] [HP-UX] [Linux] [Solaris] Notice that a single space character follows the period (.)

  2. Ensure that your CLASSPATH includes the uddiejbclient.jar file (from the app_server_root/UDDIReg/clients directory), and the code for your client.
  3. Compile your 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>

    Ensure that your PATH statement starts with app_server_root/java/bin.




In this information ...


IBM Redbooks, demos, education, and more

(Index)

Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

Task topic    

Terms of Use | Feedback

Last updated: Aug 29, 2010 6:22:59 PM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=vela&product=was-express-dist&topic=twsu_ejb
File name: twsu_ejb.html