IBM Support

Generating adapter bindings using command line builds

Technote (troubleshooting)


If adapter binding classes are not generated using serviceDeploy, how do I generate them using command line builds?


In V7, WebSphere Integration Developer must be used to generate the adapter binding classes. When building and installing using serviceDeploy and appInstall commands on the server, if the generated classes do not already exist (as would be the default case if only the authored source was exported from WebSphere Integration Developer, or the source was extracted from version control), an error will occur during deployment to indicate that the adapter binding classes are missing.

Resolving the problem

To use WebSphere Integration Developer to build the project from the command line, complete the following steps:

  1. Build the adapter projects with WebSphere Integration Developer. This example builds a project called Test that has an EIS import and has a library called cicseci7201.

    a. Create an Ant script similar to the following Ant script:

    <project name="WID Build" basedir=".">
   <property name="module" value="Test"/>
   <property name="lib" value="cicseci7201"/>

   <target name="wid.importProject">
      <importProject projectName="${lib}"/>
      <importProject projectName="${module}"/>
   <target name="" depends="wid.importProject">
      <projectBuild projectName="${lib}"/>
      <projectBuild projectName="${module}"/>

b. Run the script using runAntWid.bat:
-In a command prompt, set the workspace environment variable. For example, set WORKSPACE=C:\Workspaces\AdapterBuildWorkspace or create your own batch file in place of runAntWid.
- Change to the <WID root>\bin directory (where runAntWid.bat is located), for example, cd C:\WID70\bin.
-Run the command runAntWid pointing to the above script with the target as a parameter, for example, runAntWid.bat -buildfile D:\AntScripts\BuildAdapterBindings.wid.xml

The adapter projects are now built. The generated binding classes are in the gen/src folder. A .zip file that contains the projects can now be created and used as input to serviceDeploy in step 2.

2. Create a .zip file that contains the adapter projects and deploy them with WebSphere Process Server:

a. Create another Ant script similar to the following Ant script:

<project name="WPS Build" basedir=".">
    <taskdef name="wsStartApplication"
             classname="" />
    <taskdef name="wsInstallApp"
             classname="" />
    <taskdef name="servicedeploy"
             classname="" /> 
    <property name="workspace.dir" value="C:/Workspaces/AdapterBuildWorkspace " />
    <property name="build.output.dir" value="C:/tmp/build/out" />
    <property name="build.working.dir" value="C:/tmp/build" />
    <property name="wps.home" value="C:/WID70_WTE/runtimes/bi_v7" />
    <property name="wps.username" value="admin" />
    <property name="wps.password" value="admin" />
    <property name="wps.node" value="qnode" />
    <property name="wps.server" value="server1" />
    <target name="wps.createPI">
        <zip basedir="${workspace.dir}"
             includes="${module}/**/**/*, ${lib}/**/**/*"
             excludes="**/CVS/**" />

    <target name="wps.generateEAR" depends="wps.createPI">
        <servicedeploy scaModule="${build.output.dir}/${module}.zip"
                       keep="true" />
    <target name="wps.deploy" depends="wps.generateEAR">
 The app       <wsInstallApp ear="${build.output.dir}/${module}.ear"
                      failonerror="false" />
        <wsStartApplication application="${module}App"
                            password="${wps.password}" />

b. Run the script.
- Change to the <WPS root>\bin directory, for example cd C:\WID70_WTE\runtimes\bi_v7\bin.
- Run the ws_ant command pointing to the script with the target as a parameter, for example, ws_ant.bat -f C:\AntScripts\BuildAdapterBindings.wps.xml wps.deploy

The Application Project application is installed. The generated binding classes are in the module utility jar.

For more information about command line builds using WebSphere Integration Developer and WebSphere Process Server, see Automating tests using Ant scripts.

Document information

More support for: WebSphere Integration Developer
Test and deployment tools

Software version: 7.0,,,,,

Operating system(s): Linux, Windows

Reference #: 1614710

Modified date: 29 October 2012