- Generate a Mediator Client JAR File This page last changed on Nov 29, 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 Mediator Client JAR File To use the Static Mediator API in a client application, you must generate a 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 mapped data service operation. Method names match the mapped data service operation names. Client developers access data service operations by calling these methods. This section explains how to generate a Mediator Client JAR by these two methods: Using the IDE 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 the IDE To generate a mediator client JAR file using the IDE: Select File > Export. In the Export dialog, select Oracle Data Service Integrator > Mediator Client JAR File. Click Next. Complete the Mediator Client JAR File dialog as follows: Select a Dataspace project to export. You can only select one Dataspace project at a time. Specify a directory in which to place the exported JAR file. You can use the drop down list to select a recently specified directory or use the Browse button to locate one. Unselect the Use default name checkbox if you want to enter a name for the JAR file. Click Finish to create 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 how to generate a Mediator Client JAR file using the command-line tool. 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 client JAR, use this Ant command:
    ant -Dapproot=PROJECT_HOME -f BEA_HOME/odsi_10.3/bin/sdo_dspclientgen.xml
where PROJECT_HOME is the full path to the Data Space project's root folder, and BEA_HOME is the root path for your Oracle WebLogic installation. For example (all on one line):
    ant -Dapproot=/home/myprojects/myapp -f /home/bea/odsi_10.3/bin/sdo_dspclientgen.xml
This Ant script produces a file named PROJECTNAME-dsp-client.jar in PROJECT_HOME, where PROJECTNAME is the name of the directory PROJECT_HOME (as opposed to the full path to that directory). For example, the above script produces the Mediator Client JAR file:
    /home/myprojects/myapp/myapp-dsp-client.jar.
Optional command-line features include: 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.

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