Web Services Skeleton Project

NEWS & TIPS

  • Site Access Keys
  • Top: Alt+t
    Previous: Alt+,
    Next: Alt+.
    Up: Alt+;
    (Note: use Ctrl on the Mac)

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:

  1. Create a "java" directory. Unzip ant, eclipse, and axis here.
  2. 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

  3. 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:

  1. Open the WSDL from your Cascade Server instance by going to: http://<your-cascade-url>/ws/services/AssetOperationService?wsdl
  2. Save this as a file "asset-operation.wsdl".
  3. Replace the "asset-operation.wsdl" file in src/java/wsdl inside the eclipse project with your own file.
  4. 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

  5. Refresh the project by right clicking on the project and selecting "Refresh".

At this point Eclipse will re-build the project for you. You should not see any red x's
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.
    Last modified on Thu, 30 Aug 2007 15:42:41 -0400

    Top / Up / Table of Contents