Adjoovo Trestle - Getting Started
Trestle is a standalone tool for testing REST services through their WADL descriptions. This tech-note walks-through the installation process and using Trestle to test a REST service provided by Twitter.
Pre-requisites
Before you can run Adjovoo Trestle, you should ensure that you have the following installed:
- Java runtime (JRE) 1.6
- A compatible web browser; Firefox 3.x, Safari 3+, Chrome 3+ or Opera 10 with Javascript enabled.
!!Please note that Internet Explorer is NOT supported at this time. !!
Installation
- Download and then unpack the zip file from http://www.adjoovo.com/cms/products/downloads.html
- Open a command window in the same directory in which you unpacked the contents of the zip file.
- Start the server by running the command:
java -jar adjoovo-trestle.jar - Start your web browser, and open the following URL:
http://localhost:8080
The Adjoovo Trestle main page should be displayed after a few seconds.
Sample usage
Initially, there are no services loaded into Trestle, so we'll start by loading a WADL file describing Twitter. Click on an image to see it full-size.
First, click on the "Add" button in the left panel, which should bring up the "Add Service" dialog box.
Enter a name and optionally, a description of the service and in the URL field, use the following:
http://www.adjoovo.com/resources/samples/wadl/TwitterWadl.xml
Then click the "OK" button and wait for a few moments while the file is retrieved, parsed and stored inside Trestle.
Now we have loaded a service, we can explore the different resources available in a tree view in the main panel. In this example, we are going to choose the showUsersById resource.
When we click on the resource, the tree view is replaced by the REST tester. Here, we can enter the parameters which the REST call requires; parameters which have been defined as mandatory are highlighted in yellow. Additional HTTP headers may also be specified by clicking on the "+" button.
When we are satisfied with out parameters, click on the "Test" button to make a REST call to the service. The response is displayed in the bottom half of the view (in the screenshot, the request has been collapsed for clarity).
To return to the tree view, click on the button in the top-left of the tester view.
