Class Definition Reference
Describes the structure of an XData block.
An XData block is a named unit of data that you include in a class definition, typically for use by a method in the class. Most frequently, it is a well-formed XML document, but it could consist of other forms of data, such as JSON.
An XData block has the following structure:
XData name [ keyword_list ]
(required) is the name of the XData block. This must be a valid class member name
, and must not conflict with any other class member names.
(optional) contains the payload of the XData block. If XML, it must be a well-formed document (with a single root element), without the XML declaration at its start.
(optional) is a comma-separated list of keywords that further define the XData block.
If this list is omitted, also omit the square brackets.
Class Demo.CoffeeMakerRESTServer Extends %CSP.REST
Parameter HandleCorsRequest = 1
XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]
<Route Url="/test" Method="GET" Call="test"/>
<Route Url="/coffeemakers" Method="GET" Call="GetAll" />
<Route Url="/coffeemaker/:id" Method="GET" Call="GetCoffeeMakerInfo" />
<Route Url="/newcoffeemaker" Method="POST" Call="NewMaker" />
<Route Url="/coffeemaker/:id" Method="PUT" Call="EditMaker" />
<Route Url="/coffeemaker/:id" Method="DELETE" Call="RemoveCoffeemaker"/>
Content Date/Time: 2019-02-15 22:51:05