Skip Headers
Oracle® Communications Network Integrity UIM Sample Web Service Guide
Release 7.1

E23708-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

6 Compiling the UIM Sample Web Service Client

This chapter shows you how to compile the Web service client jar file. The following instructions show you how Network Integrity compiles the client jar. By default, Network Integrity cartridges are provided with a client JAR and this step is needed only to modify the Web service and have NI cartridges use it.

Generating the NI UIM Client JAR File

To start using the Web service in client software, you must generate the NI_UimClient.jar file. The environment must have the following variables set:

<?xml version="1.0"?>
<project name="UIM-Web-Service-Client" default="all" basedir=".">
 
  <property environment="env"/>
  <property name="wsdl_path" value="${basedir}/../ora_ni_uim_webservice/wsdl"/>
 
  <defaultexcludes add="**/.ade_path"/>
  <defaultexcludes add="**/.ade_path/**"/>
 
  <path id="wsdl_create.classpath">
    <pathelement path="${CLASSPATH}"/>
    <fileset dir="${env.WL10_HOME}/wlserver_10.3/server/lib">
      <include name="weblogic.jar"/>
      <include name="webservices.jar"/>
    </fileset>
  </path>
 
  <taskdef name="clientgen" 
classpath="${env.WL10_HOME}/wlserver_10.3/server/lib/weblogic.jar"
           classname="weblogic.wsee.tools.anttasks.ClientGenTask"/>
 
  <target name="all" depends="build.jar, copyWeblogicJars"/>
 
  <target name="generate.client" description="generate ws client stubs">
    <clientgen type="JAXRPC" wsdl="${wsdl_path}/NI_Uim.wsdl"
               destdir="${basedir}/uimgenerated/src" packagename="oracle.communications.inventory.webservice.impl"
               servicename="NI_Uim" generatepolicymethods="True" generateasyncmethods="False" failonerror="True"
               verbose="True">
      <binding file="${wsdl_path}/type-mapping.xsdconfig"/>
    </clientgen>
  </target>
 
  <target name="compile" depends="generate.client">
    <!-- compile the server files -->
    <mkdir dir="${basedir}/uimgenerated/classes"/>
    <mkdir dir="${basedir}/lib"/>
    <copy todir="${basedir}/uimgenerated/classes/oracle/communications/inventory/webservice/impl">
      <fileset dir="${basedir}/uimgenerated/src/oracle/communications/inventory/webservice/impl" includes="*/**" excludes="**/*.java"/>
    </copy>
    <javac srcdir="${basedir}/uimgenerated/src" destdir="${basedir}/uimgenerated/classes" includes="**/*.java"
           excludes="**/.ade_path/**" debug="${debug}">
      <classpath refid="wsdl_create.classpath"/>
    </javac>
    <jar destfile="${basedir}/lib/NI_UimClient.jar" basedir="${basedir}/uimgenerated/classes"/>
  </target>
 
  <target name="build.jar" depends="compile" description="Generates the WebService client JAR"></target>
 
  <target name="clean" description="Clean the project">
    <delete dir="${basedir}/uimgenerated"/>
    <delete file="${basedir}/lib/NI_UimClient.jar"/>
  </target>
  
  <target name="copyWeblogicJars" description="Copies the Oracle WebLogic Server jars into integrityLib">
        <copyWeblogicLibraries toDir="${basedir}/integrityLib" />
  </target>
    
  <macrodef name="copyWeblogicLibraries">
    <attribute name="toDir" default="."/>
    <sequential>
      <copy todir="@{toDir}">
        <fileset dir="${env.WL10_HOME}/wlserver_10.3/server/lib">
          <include name="weblogic.jar"/>
          <include name="webservices.jar"/>
          <include name="wseeclient.jar"/>
        </fileset>
      </copy>
       <copy todir="@{toDir}">
        <fileset dir="${env.WL10_HOME}/modules">
          <include name="javax.xml.rpc_1.2.1.jar"/>
        </fileset>
      </copy>
    </sequential>
  </macrodef>
</project>

Execute the All target.

The above results in the NI_UimClient.jar, which can then be used in client software.