Fletcher

Fletcher Overview

Fletcher is a publicly available Web service that provides an interface to planning resources hosted at North Carolina State University. Clients requesting services from Fletcher send messages using SOAP over HTTP. Our paper titled Fletcher: A Web Service for Planning describes Fletcher in more detail.

Features

Schemas

Many of Fletcher's inputs and outputs are validated against schemas defined in the W3C XML Schema Definition Language. For inputs, if the data is not valid according to the corresponding schema, the response includes a SOAP fault and the message is not processed. Outputs returned from Fletcher are guaranteed to conform to their corresponding schema and the client developer may program against those schemas. Note that Fletcher is still in early development and the schemas may change in future versions.

Read more about the Liquid Narrative Group's planning schemas.

Usage

Fletcher is still in early development and breaking changes may be made to the input and output schemas or to the service interface. However, the current version of Fletcher is available for public use. New versions will become available as improvements are made and old versions may remain available.

Perform the following steps to begin using Fletcher in Visual Studio .NET 2003 (or perform similar steps for other IDEs and programming languages):

  1. Setup
    Creating a proxy allows an application to access a Web service as if it were a local object; in Visual Studio .NET this proxy can be automatically created using the Web reference feature.
    1. Open the project to which you would like to add the ability to invoke Fletcher.
    2. Right-click on the project in the Solution Explorer.
    3. Select "Add Web Reference...".
    4. Enter the URL of the version of Fletcher that you would like to use and click "Go". Visit the Fletcher server to obtain the URL of the current version of Fletcher.
    5. Set the Web reference name and click "Add Reference."
  2. Invocation
    These code samples are in C# and use the proxy class created in the setup step, but similar code could be written in any other languages that are able to invoke Web services.
    1. Create a new instance of the Fletcher Web service (note that the FletcherWS class will most likely be in the ProjectName.WebReferenceName namespace):

      FletcherWS fletcher = new FletcherWS();

    2. Create a CookieContainer to store session information:

      fletcher.CookieContainer = new System.Net.CookieContainer();

    3. Invoke the methods exposed by the FletcherWS class. One common invocation sequence is to create a planning context, expand the plan space to the first complete plan, and then retrieve that plan.

    The following example includes these three steps for invoking Fletcher. In order to invoke one of the methods exposed by Fletcher, a planning context document must be created for its input. In the example, it is created based on a domain document and a problem document that are already in memory as well as a heuristic name that is obtained from the Fletcher Web service. The classes in the Planning.Xml assembly are used to do create the planning context document (the Planning.Xml assembly is described in the planning schemas section). Alternatively, the planning context document could have been read from a file.

Future Plans

About Us | Site Map | Privacy Policy | Contact Us | ©2005 NC State University