You can use the command line to migrate programs from WebSphere® Studio Application
Developer Integration Edition into Rational® application tools.
Procedure
- Change to the directory where the J2CMigration.bat and J2CMigration.sh files are located:
the default installation directory for the J2C
migration tool is system_drive: <install-dir>\plugins\com.ibm.j2c.migration.wsadie_7.2.0.vxxx.
: the default installation directory for the J2C
migration tool is: <install-dir>\plugins\com.ibm.j2c.migration.wsadie_7.2.0.vxxx.
- You need to modify the J2CMigration.bat or J2CMigration.sh
- Locate the place in the file where you set variables:
ECLIPSE_ROOT: This is where the eclipse.exe
and eclipse.ini files are located. The default value will be <install-dir>
for Rational application
development products.
ECLIPSE_ROOT= <install-dir> , where you will set the directory location to match your environment.
SET ECLIPSE_ROOT=/opt/<install-dir>
JDK_HOME : This is where the java.exe
is located.
The default path is %ECLIPSE_ROOT%\jdk\jre\bin
SET JDK_HOME=%ECLIPSE_ROOT%/jdk/jre/bin
.
rarsPathVar : This is the path where
the Resource Adapters folder is located. You can locate the exact
path by opening
<install_path>configuration/config.ini, and searching for
rarsPathVar.
SET RARVARPATH=%ECLIPSE_ROOT%/ResourceAdapters.
SET RARVARPATH=%ECLIPSE_ROOT%/ResourceAdapters
was.runtime: This is where the WAS
runtime folder is located. You can locate the exact path by opening
<install_path>configuration/config.ini, and searching
for
rarsPathVar.
SET WASRUNTIME=%ECLIPSE_ROOT%/runtimes
SET WASRUNTIME=%ECLIPSE_ROOT%/runtimes
EQUINOXJAR: This is where the org.eclipse.core.Launcher.Main
jar file is located.
SET EQUINOXJAR=%ECLIPSE_ROOT%\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
SET EQUINOXJAR=%ECLIPSE_ROOT%/plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
- The default workspace %WORKSPACE% %WORKSPACE%will be set to: %WORKSPACE%%ECLIPSE_ROOT%\workspace\Migration1
or %ECLIPSE_ROOT%\workspace\Migration1 in the migration batch file
or shell script.
- Save and close the file. From the J2CMigration directory
in your product install folder, run the J2CMigration.bat and J2CMigration.sh.
- Enter the appropriate command and option as described in
the tables below:
Table 1. Commands to run the J2C
Migration Tool| Windows command |
Linux command |
Description |
| J2CMigration.bat [options] |
./J2CMigration.sh [options] |
Use this command for starting the J2C Migration
tool, using one of the two usage patterns:Usage: - J2CMigration.bat -w wsdlsource -d workspace [-p project] [-t
type] [-o option] [-s summary]
- J2CMigration.bat -f migrationinputfile
|
| J2CMigration [options] |
|
Options- -w wsdlsource: The full path of the service
WSDL file or the full path of the folder that contains one or more
service WSDL files.
- -f migrationinputfile: The migration file
which contains the above options to be passed into the command line
migration tool This method is useful when your command line options
exceed the maximum allowable length. See SampleMigration.txt Sample Migration Inputfile for reference.
- -d workspace: The workspace where the output
is generated.
- [-p project] : The name of the project where
the migrated artifacts will be generated. Do not include a path,
just a name for the project. You can specify web, Java™, or EJB project to be created. If no project
is specified, a default Java project will be created. If you do not specify the -p option, then
the migrated artifacts will be generated to the project specified
in the service WSDL file.
- [-t type]: Project type of the output project:
- [-o option]
- databindingonly: Specify this option if you
want only data binding beans to be generated during migration. If
you specify databindingonly, the commandbean option will be ignored.
- commandbean: Specify this option if you want
a command bean to be generated.
- [-s summary]: The name of migration summary
(without .xml). If none is specified, the default summary file will
be j2cmigration_timestamp.xml. If the summary file already exists,
we will write the summary to the summary_timestamp.xml. If you specify
a location say d:\summaryFolder\summary, the summaryFolder must exist.
If you do not specify a location, the summary will be generated in
the current directory.
- [cicsver]: The version of the CICs rar you
are using in your migrated project. For example, 6.1.0.2. If no CICs
resource adapter version is specified, the application locates one
from the registry.
- [imsver]: The version of the IMS™ rar you are using in your migrated project.
For example, 9.1.0.2.5a. If no IMS resource adapter version is specified, the application locates one
from the registry.
- [wasver]: The version of the WebSphere application server you are using
in your migrated project. If none specified, the default is 7.0 Valid
values:
- [cicsrar]: The full path to the CICs resource
adapter. For example: d:\IBM\sdp75\ResourceAdapters\cicseci6102.rar.
- [imsrar]: The full path to the IMS resource adapter. For example: d:\IBM\sdp75\ResourceAdapters\imsico91025.rar.
- [suffix]: impl, proxy, or any suffix that you want to use for your J2C
implementation. If this option is not specified, the implementation
suffix is proxy.
|
Example
Command-line migration examples

J2CMigration.bat -d "d:\myworkspace" -w "d:\mywsdl.wsdl" -p "OutputProject"

./J2CMigration.sh -d /home/myworkspace -w /home/mywsdl.wsdl -p OutputProject
This command line will migrate a single service as defined
in d:\myservicewsd.wsdl. The migrated artifacts are generated in a Java project with the project name
"OutputProject" inside workspace d:\myworkspace. The files generated
are
- interface Java file
- proxy(implementaion) Java file
- data binding Java file
- j2cmigration_timestamp.xml file (The migration summary will be
saved in under current directory.

J2CMigration.bat -w "d:\mywsdlFolder" -p "OutputProject" -s "MigrationReport"

./J2CMigration.sh -w /home/mywsdlFolder -p OutputProject -s /home/myworkspce/MigrationReport
This will migrate all the services in the folder d:\myservicewsdlfolder
or in any other subfolders under d:\myservicewsdlfolder. The migrated
artifacts (for all the services) are generated in a single Java project with the project name
"OutputProject" . The files generated are
- interface Java file
- proxy(implementaion) Java file
- data binding Java file
- MigrationReport.xml file (The migration summary will be saved
in under current directory.

J2CMigration.bat -w "d:\myfolder" -o databindingonly

./J2CMigration.sh -w /home/myfolder -o databindingonly
This will migrate all the services in the folder d:\myfolder
or in any other subfolders under d:\myfolder. The files generated
are:
- data binding Java file
- j2cmigration_timestamp.xml file (The migration summary will be
saved in under current directory.

J2CMigration.bat -w "d:\myfolder" -o commandbean -t EJB

./J2CMigration.sh -w /home/myfolder -o commandbean -t EJB
This will migrate all the services in the folder d:\myfolder
or in any other subfolders under d:\myfolder. The migrated artifacts
are generated in EJB Projects with the project names take from the
WSDL definitions. . The files and artifacts generated are:
- interface Java file
- proxy(implementaion) Java file
- data binding Java files
- command bean
- j2cmigration_timestamp.xml file (The migration summary will be
saved in under current directory.

J2CMigration.bat -f "d:\SampleMigration.txt"

./J2CMigration.sh -f /home/SampleMigration.txt"
Migrate according to the options being specified in the migration
inputfile.