Generating the API

A Session Facade artifact represents an integration point within the defined Service Contract. An integration point (or Service Facade Artifact) models an end-point (for example, a Web Service). The first step of this tutorial is to create a simple end-point and generate a Web Service Definition (.wsdl).

To create an end-point and a Web Service Definition:

  1. On the Tigerstripe menu, select New and select New Interface. Alternatively, click the Integration Point icon () on the toolbar. The New Session Artifact dialog box displays.
  2. Note: This is a multi-step dialog box however, for the purpose of this tutorial, you will only use a small portion of the dialog box to create the Session Facade Artifact. Please refer to Creating/Editing Session Facade Artifacts for more details about the New Session Artifact dialog box.

  3. Enter the details about your new artifact and click Finish. The details of the newly created Integration Point or Service Facade Artifact display. In the Tigerstripe Explorer, expand the src folder and you will see the newly created artifact in the model as shown below:

    Note: Spaces and special characters are not allowed in an artifact name.

  4. In your project perspective, navigate to the Generation tab. Under the Managed Entities area you should see a number of lists. Click Add and you will be presented with a dialog in which there will be the Entity that you previoulsy created.
  5. Select the Entity and click OK.

Adding a Method to your Facade Artifact

A method represents an operation available on a Service. An example of a method would be if you wanted to build a Service related to order handling, and you wanted to offer an operation on the Service to process orders.

To add a method:

  1. Open your artifact perspective.
  2. Expand the Methods option and click Add.
  3. Enter a name for your method.
  4. Add a method argument by clicking Add next to the Method Argument section.
  5. Click Save to save your changes.

For the purposes of this tutorial, consider the example of a Service Contract that is required to support the transfer of information about a customers trouble report. The report will have some attributes such as customer details, type of problem, and status. The customer trouble report will be modeled as a Managed Entity Artifact, which will have attributes to support these different types of information.

We have not yet defined any any Notifications, Queries, or Update Procedures, so at this point you can ignore those lists (and the warnings that appear saying that the interface has no declared Notifications etc).

Once you save your project, you can review all of the artifacts in the Tigerstripe Explorer. You may want to ensure that you have no errors in the Problems view.

Note: In this example, there will be warnings associated with the Interface because this example is not completely realistic.

Generating a Service Contract

In Tigerstripe Workbench, project generation is handled through Tigerstripe plug-ins. Although advanced users can create their own plug-ins, by default Tigerstripe Workbench ships with three basic plug-ins:

Before you can generate your Service Contract, you need to select the target Integration Profiles . For this example, select the J2EE and XML profiles.

To generate a service contract:

  1. Double click the project descriptor (tigerstripe.xml) from the Tigerstripe Explorer. This opens your Tigerstripe project perspective.
  2. Navigate to the Generation tab and enable both the J2EE Integration Profile and the JMS/XML Integration Profile, by selecting Enable in both sections.
  3. Click Save to save your changes.
  4. Click the Generate icon () on the toolbar. The Generate Tigerstripe Project dialog box displays.
  5. Accept the default Source Folder or click Browse to navigate to a new location and click Finish.

The Service Contract specification has now been generated. The corresponding files have been generated in a newly created target folder in the Tigerstripe Explorer. You can review the generated code by double-clicking on the corresponding files.

Related Topics

Tutorial Overview
Creating a New Project
Adding ArtifactsI
Common Procedures

The next section describes some of these common procedures.


© copyright 2005, 2006, 2007 Cisco Systems, Inc. - All rights reserved