How to Generate the Java Web Service Client Jar

  1. Download and install Axis2

    1. Go to https://axis.apache.org/axis2/java/core/index.html, download and extract the latest Axis2 package. (Currently axis2-1.7.3-bin.zip)
    2. Set up the AXIS2_HOME environment variable to the extraction directory. (In this example, C:\axis2-1.7.3)

  2. Download and install Ant

    1. Go to http://ant.apache.org/bindownload.cgi, download and extract the latest Ant package. (Currently apache-ant-1.9.7-bin.zip)
    2. Add the Ant bin directory to the Windows Path environment variable (In this case C:\apache-ant-1.9.7)

  3. Obtain the needed UCMDB WSDL

    1. Create a temp folder: C:\Temp
    2. Copy the file <UCMDB_install_dir>\deploy\axis2\WEB-INF\services\ucmdb_service.aar from previous step into the Temp folder.

    3. The ucmdb_service.aar file is a zip file. You can extract its content to C:\Temp.

      Note If for some reason Windows is not recognizing it as a zip file, change its extension to .zip. Depending on archiving utility a folder ucmdb_service may be created inside the Temp folder.

  4. Generate the Web Service client jar

    1. Create a working directory, for example, C:\WS Client.

    2. Switch to the working directory and execute the following command to build the Java source files and the Ant build.xml file:

      "C:\axis2-1.7.3\bin\wsdl2java.bat" -s -d adb -S generated_ws_code_client -uri "C:\Temp\ucmdb_service\META-INF\UcmdbService.wsdl" -p com.hp.ucmdb.generated.services
    3. Execute the following command to build the Java client JAR file:

      ant
    4. If everything completes successfully, you should have the following:

      • C:\WS Client\build\classes - Will contain the generated classes
      • C:\WS Client\build\lib\UcmdbService-test-client.jar