Web Service (.asmx) Scripts
Web services can be written in a variety of languages, including the scripting version of Dyalog APL. For more information on APL source files, see APL Source Files.
The first statement in the script file declares the language and the name of the service. For example, the following statement declares a Dyalog web service named GolfService.
<%@ WebService Language="Dyalog" Class="GolfService" %> Language="Dyalog" is specifically connected to the Dyalog .NET Compiler through the application's web.config file or through the global ASP.NET system file Machine.config.
Legacy
Prior to Dyalog v11.0, Language="APL" was used instead.
The syntax of this first line is common to all web services, irrespective of the language in which they are written.
A Dyalog web service script starts with a :Class statement and ends with an :EndClass statement. These statements are directives used by the Dyalog .NET Compiler and are specific to Dyalog.
The :Class statement declares the name of the class (which must be the same as the name declared in the WebService statement) and the base class from which it inherits, which is normally System.Web.Services.WebService.
:Class GolfService: System.Web.Services.WebService Following the :Class statement can be any number of APL expressions and function bodies, at the end of which must be an :EndClass statement. Internal sub-classes (nested classes) can be inlcuded within the main :Class ... :EndClass block.
Functions usually take arguments and return results whose types must be known, therefore the statement :Using System must almost always appear immediately after the :Class statement to locate them.