Web Services Skeleton Project
Prerequisites: This assumes you have Eclipse 3.2 and Ant 1.7 installed and configured for your development environment, as well as Axis 1.3+ libraries available (axis 1.4 recommended).
You will also need to download the following file: Cascade+Webservices.zip
It is recommended you set up your environment in the following manner:
- Create a "java" directory. Unzip ant, eclipse, and axis here.
- Add the ant executable to your path. You should be able to type "ant" on the command line and see ant (attempt to) run, something like:
C:\>ant
Buildfile: build.xml does not exist!
Build failed
- Add the axis libraries to the ant lib directory. Navigate to ant/lib and copy the following files from your axis distribution (usually in axis/lib):
- activation.jar
- axis.jar
- commons-discovery-0.2.jar
- commons-logging-1.0.4.jar
- jaxrpc.jar
- mailapi_1_3_1.jar
- saaj.jar
- wsdl4j-1.5.1.jar
- axis-ant.jar
This is a skeleton webservices project for working with the webservice capabilities of your instance of Cascade Server. To use this project, import it into Eclipse by choosing file -> import -> Existing Projects into Workspace and choosing the root folder (the folder you unzipped the project to).
Do not be alarmed if there are compilation errors, this is because you still need to generate the Java client stubs for interacting with the web services layer.
To do this:
- Open the WSDL from your Cascade Server instance by going to: http://<your-cascade-url>/ws/services/AssetOperationService?wsdl
- Save this as a file "asset-operation.wsdl".
- Replace the "asset-operation.wsdl" file in src/java/wsdl inside the eclipse project with your own file.
- Open a command-line window to run ant. Navigate to to the base directory where the project was unzipped to (something like java/workspace/Cascade Webservices). Type the command "ant".
You should see something similar to:
C:\Java\workspace\Cascade Webservices>ant
Buildfile: build.xml
clean:
generate-stubs:
[wsdl2java] WSDL2Java C:\Java\workspace\Cascade Webservices\src\java\wsdl\asset-
operation.wsdl
BUILD SUCCESSFUL
Total time: 1 second
- Refresh the project by right clicking on the project and selecting "Refresh".
on any files (which indicate java compilation errors). You should then be able to run the
"TestRead" application to ensure the local axis webservices infrastructure can communicate with your
Cascade Server instance.