Technical Notes |
|
This technical note explains how to use a third-party package in a Java web service project generated by the Verastream Host Integrator Web Builder.
Use one of the following procedures to add third-party Java code (.jar package file) to a Java Web Service project created by Verastream Web Builder.
Follow the steps below to use a third-party package in a single web service project. If you plan to create multiple projects that require the reference to this third-party package, you may want to create a User-Defined Project Type. If so, follow the steps in Creating a User-Defined Project Type for Multiple Projects.
<!-- compile --><target name="compile" description="Compiling Web Service"> <mkdir dir="${blddir}"/> <!-- we must use debug="true" or axis will not show parameter names in the wsdl --> <javac srcdir="${srcdir}" destdir="${blddir}" debug="true"> <classpath> <fileset dir="${vhiroot}/${vhijardir}"> <include name="apptrieve.jar"/> <include name="vhiprop.jar"/> <include name="wcp.jar"/> </fileset> <fileset dir = "${vhiroot}/${axislibdir}"> <include name = "axis.jar"/> <include name = "jaxrpc.jar"/> <include name = "oracle.jar"/> </fileset> </classpath> </javac> <antcall target="configure" /></target> |
import oracle.jdbc.driver.*;If you plan to create multiple projects that require the reference to this third-party package, you may want to create a User-Defined Project Type based on the default Java Web Service project. This will allow you to use the same customized project template for multiple applications.
To create a User-Defined Project Type, follow the steps below.
Note: If you need to access this file at a later time, the file is located at <VHI path>\webbuilder\userpluginprojects\<project type name>\resources\Project\build.xml.
Locate the "Compiling Web Services" section, and add
<include name = "axis.jar"/> <include name = "jaxrpc.jar"/> <include name = "oracle.jar"/> |
Note: If this dialog box is not displayed, click Options > User-Defined Project Types.
To use the new user project template, in Web Builder click Project > New and select the new project from the Project Type list.