Describing Available REST Services
You can generate a description of the REST services that are offered by your REST services application, by clicking the Generate Description button on the Web Options sheet of the Define Application dialog.
The description includes only the classes and the superclasses referenced by the specified parameter values and return types of the communications methods of the JadeRestService subclass selected for the application. Note, however, that no class description is included if those methods return only Any or a primitive type.
The XML file contains the following information.
-
Application name and required URL.
-
Each available resource.
-
HTTP verb; for example, GET, PUT, POST, or DELETE.
-
Resource identifier; for example, Customer.
-
Required parameter names and types.
-
Type of object to be supplied in JSON or XML.
-
-
Each class referred to by the signatures of the resource methods.
-
Name of the class.
-
Name and C# type of each property.
The following table maps JADE property types to C# types.
JADE Type C# Type Binary Byte [] Boolean Boolean Byte Byte Character Char Date DateTime Decimal Decimal Integer Int32 Integer64 Int64 JadeBytes Byte [] HugeStringArray String [] Point String format <integer>, <integer> Real Double String String StringUtf8 String Time DateTime TimeStamp DateTime TimeStampInterval TimeSpan TimeStampOffset DateTime (with UTC offset set)
-
The following description file is not an exposure, but it would be of value to a REST client developer building requests and handling responses.
<Application name="RestApp" uri="http://localhost/jade/jadehttp.dll/" example="http://localhost/jade/jadehttp.dll/Person.json?RestApp"> <resources> <method name="DELETE" id="Customer"> <request> <param name="pId" type="int" /> </request> <response type="empty" /> </method> <method name="GET" id="Customer"> <request> <param name="pId" type="int" /> </request> <response type="Customer" /> </method> <method name="GET" id="CustomerName"> <request> <param name="pId" type="int" /> </request> <response type="String" /> </method> <method name="POST" id="Customer"> <request> <param name="pName" type="String" /> <param name="pAddress" type="String" /> </request> <response type="empty" /> </method> <method name="PUT" id="Customer"> <request> <param name="pId" type="int" /> <param name="pName" type="String" /> <param name="pAddress" type="String" /> </request> <response type="empty" /> </method> </resources> <CommunicationClasses> <Customer> <address type="String" /> <id type="int" /> <myRoot type="Root" /> <name type="String" /> </Customer> <Root> <allCustomers type="List<Customer>" /> <id type="int" /> </Root> </CommunicationClasses> </Application>