Ada Programming/Libraries/Web/AWS

From Wikibooks, open books for an open world
Jump to navigation Jump to search


AWS is a complete framework to develop Web based applications. The main part of the framework is the embedded web server. This small yet powerful Web server can be embedded into your application so your application will be able to talk with a standard Web browser like Microsoft Internet Explorer or Firefox for example. Around this Web server a lot of services have been developed.

AWS supports SOAP Web Services.

See also: AWS web site

Sample code[edit]

The famous Hello World demo for AWS, a complete Web server that will display "Hello world!" for every requests made to localhost on port 8080.

 with AWS.Default;
 with AWS.Response;
 with AWS.Server;
 with AWS.Status;

 procedure Hello_World  is

   WS : AWS.Server.HTTP;

    function HW_CB (Request : AWS.Status.Data)  return AWS.Response.Data  is
       return AWS.Response.Build ("text/html", "Hello world !");
    end HW_CB;

   AWS.Server.Start (WS, "Hello World", Callback => HW_CB'Access);

    delay 60.0;

   AWS.Server.Shutdown (WS);
 end Hello_World;

See also[edit]

External links[edit]