warningThis page is deprecated
SOAP Sample code: Build Java Client Library
The Blackboard Learn SOAP Web Services come out of the box with sample code that can be downloaded directly from the user interface. This document will describe the process by which a developer can build the java client library contained within that code.
The file that you download from Learn containing all of the sample code is
called client.zip, so when you unzip it, it will be called client. This is
referred to as the top-level client directory in this document. This document
specifically deals with a subfolder of that directory, which is also called
client. When top-level client directory is specified, this refers to
_/path/client_. When top-level is not specified, it refers to
Preparing the Development Environment
This sample code was initially built when Blackboard Learn 9.1 was released several years ago. As a result, it is dependent upon some older technology. It is suggested that the technologies installed for this tutorial be segmented for this purpose.
|SED||If building on Windows, you must install sed, either stand-alone, or from cygwin|
|Java||Script tested on Java 7, should work with Java 8|
|Axis2 1.3 Source||axis2-1.3-src.zip|
|Rampart 1.4||rampart-dist-1.4-bin.zip||In order to set the development environment up with these technologies without overriding newer versions that may be being used in other projects, it is recommended that a separate directory be set up in the top-level client directory and environment variables be temporarily pointed to them. In this example, a tools directory has been added to the client directory, an Ant, Axis, and Rampart were unzipped here.|
Now open a terminal or .html window, and navigate to the client directory, by typing:
We will need three environment variables to be set: JAVA_HOME, AXIS2_HOME, ANT_HOME. JAVA_HOME should be set to point to your JDK installation. This is probably already set. To verify, type:
The next step is to configure axis2 for building the sample code. To do this, we must copy a few files from rampart, and modify one file. In our example, we would copy all the jar files in client/tools/rampart-1.4/lib to client/tools/axis2-1.3/lib. Then we must copy client/tools/rampart-1.4/modules/rampart-1.4.mar to client/tools/axis2-1.3/repository/modules directory. In the same directory you copied the mar file to, there is a file called modules.list. You must edit this file and add rampart-1.4.mar to the bottom of the list and save it. The last step is optional, and that is to create a subdirectory to axis2-1.3 called src, and download the axis2 source here. This is not required for the build to work, but if you will be debugging your code in Eclipse, this will allow you to follow the code into Axis2.
Now your development environment is all set to generate the code and build the Java Web Services Library.
Building the Library
The first step is to generate the code. This is done at the command line and in the client/client directory. Simply run _**sampleGenClient.[.html|sh]