Generate a Web Services Mediator Client JAR File This page last changed on Nov 28, 2008. .stickable, h1, h2, h3, h4, h5 false true Show Sticky notes Hide Sticky notes Save Cancel Oracle Data Service Integrator Documentation > Data Services Developer's Guide # How To Generate a Web Services Mediator Client JAR File This section explains how to generate a Web Services Mediator Client JAR file. This JAR is required by developers writing Java clients that access data services through web services using the Static Mediator API. This section includes these topics: Overview Using Workshop for WebLogic Using the Command-Line Tool ## Overview To use the Static Mediator API in a web services-enabled client application, you must generate a Web Services Mediator Client JAR file. This JAR file contains the Static Mediator API interfaces, plus all the necessary SDO-compiled schemas for a dataspace. One Java method is generated for each data service function that is mapped to a WSDL operation. Method names match the mapped WSDL operation name. Client developers access data service functions through the web service by calling these methods. If the web service requires message-level security, you can add a credential provider and trust manager through initial context properties. For more information on security, see Configure Security for Web Services Applications. This topic explains how to generate a Web Services Mediator Client JAR file using these methods: Overview Using Workshop for WebLogic Using the Command-Line Tool Tip: You can also generate a Mediator Client JAR using the Administration Console. See the Oracle Data Service Integrator Adminstration Guide for details. ## Using Workshop for WebLogic To generate a Web Services Mediator Client JAR file using Workshop for WebLogic: Select File > Export. In the Export dialog, select Oracle Data Service Integrator > Web Services Mediator Client JAR File, and click Next. Complete the Web Services Mediator Client JAR File dialog as follows, and click Finish. In the left panel, select the Dataspace project that contains the .ws file(s) to export. You can only export .ws files in one Dataspace project at a time. Checking/unchecking the checkbox next to a project or a folder automatically checks/unchecks all the sub-folders and .ws files under that project/folder. In the right panel, select the Web Service Map file to export. You can select one or more .ws files. To see and selectively check the .ws files in a sub-folder, you will need to expand and click on the folder on the left panel. The message under the right panel shows the total number of .ws files currently checked for export. Specify a directory in which to place the exported JAR file. You can select any location on your system. You can use the dropdown list to select a recently specified directory or use the Browse button to locate one. By default, the exported JAR will be named: <data_space_name>-ws-client.jar. Unselect the Use default name checkbox if you want to enter a name for the JAR file. The Oracle Data Service Integrator Console view displays the export task status and any errors that may have occurred. You can click the Cancel button to cancel the export task before it has completed. ## Using the Command-Line Tool This section explains now to generate the Web Services Mediator Client JAR file using Ant and presents example Ant commands. Before using the command-line tool, be sure you have the following: Oracle WebLogic Server 10.3 installed with Oracle Data Service Integrator installed in the default location BEA_HOME/odsi_10.3. A Dataspace project on your local filesystem that contains data service (.ds) and schema (.xsd) files. Miscellaneous IDE files within the project folder are allowed and will not affect the export. Ant installed and in your path. To generate the JAR file, run this Ant command:
    ant -Dapproot=PROJECT_HOME -Dwslocator=locator -f BEA_HOME/odsi_10.3/bin/sdo_dspclientgen.xml
- - Where: PROJECT_HOME is the path to the Dataspace project. You must specify a full path for the values of BEA_HOME and PROJECT_HOME. The locator option takes one of these values: d:URI - Specifies a URI (or a semicolon-separated or space-separated list of URIs) to a .ws file in the Dataspace project from which to generate the JAR file. For example:
        ld:MediatorTestDataServices/CustomerWeb.ws
ALL - Generates the JAR for all .ws files in the dataspace. The result of executing this Ant script is a file named PROJECT-ld-client.jar in PROJECT_HOME, where PROJECT is the name of the directory PROJECT_HOME (as opposed to the full path to that directory). ### Additional Ant Task Options This section lists several optional features that you can use with the Ant tasks described in the previously: Your environment must contain a WL_HOME environment variable, pointing to the WLS 9.2 installation. If it does not, you can provide an alternate by adding -Dwl.home=/path to specify the WLS root directory. Your Oracle Data Service Integrator installation must be in the default directory BEA_HOME/odsi_10.3. If it is not, you can provide an alternate by adding -Ddsp.home=/path to specify the directory. To specify a full directory path for the output, add -Doutdir=/dirpath to the Ant command. You must provide an absolute path; a relative path, including ".", will not work, as it is assumed to be relative to PROJECT_HOME. To specify a different name for the JAR file, add -Dsdojarname=name.jar. ### Example 1 This example specifies multiple .ws files. The command must be entered on one line.
    ant -Dapproot=/home/myprojects/myapp -Dwslocator='ld:MediatorTestDataServices/CustomerWeb.ws;
    ld:MediatorTestDataServices/OtherCustomerWeb.ws' -f /home/bea/odsi_10.3/bin/sdo_dspclientgen.xml
### Example 2 This example generates a JAR that includes all of the .ws files in the dataspace. The command must be entered on line line.
    ant -Dapproot=/home/myprojects/myapp -Dwslocator=ALL -f /home/bea/odsi_10.3/bin/sdo_dspclientgen.xml

Document generated by Confluence on Jan 13, 2009 15:58