Beginning with version 11, Advantage ships the Web Platform, a web service that allows applications to communicate with Advantage Databases without having a specific Advantage Client Engine (ACE) available. The ACE is only available for Windows and Linux. Using the Web Platform, any device with any operating system that supports http(s) communication is enabled to access Advantage data, including Android, iOS, and Windows Phone. The Advantage Web Platform is a module for an Apache web server (currently only supported on Windows, Linux might be supported soon) that follows the OData standard (http://www.odata.org).

Installation

To install the Advantage Web Platform, execute adsweb.exe contained in the ADS installation files. The installation process runs quite easy, without having any options to choose.

Web Platform Install Wizard
Web Platform Install Wizard

After the installation is finished, the Apache icon appears in the taskbar. Via the context menu of this icon, the Web Platform can be started and stopped.

Apache Icon
Apache Icon

Testing


By default, the Web Platform is configured to listen to port 6272. You can change it by modifying httpd.conf located in „Program Files (x86)\Advantage 12.0\adsweb\Apache24\conf“. That folder contains another conf file, adsweb.conf, which is used to configure OData end points. But first try out if Apache is running. Open a Web Browser (Google Chrome is recommended due to it’s great debug options) and type

http://localhost:6272

into the address line. Hit enter to open the test page.

Web Platform: first Test
Web Platform: first Test

As a next step, open adsweb.conf and search for the DBConnectionString configuration of example_db. This contains a path to a sample database (Program Files (x86)\Advantage 12.0\adsweb\example_db\tasks.add). Add this to your Data Architect repository for testing.

Data Architect: Database Setup
Data Architect: Database Setup

Then connect the database and open table by table. This will force a reindex, so the collation fits to your local settings. Once done, type

http://localhost:6272/adsweb/example_db

into the address line of your Web Browser. If all works well, you’ll be prompted for database username and password and then this should return an XML script containing the OData end point description.

OData end point description
OData end point description

As a next step, get the content of the Tasks table by using the URI (unique resource identifier)

http://localhost:6272/adsweb/example_db/v1/Tasks

For details on the Advantage-specific URI format see the Advantage help file, chapter „Advantage Web Platform“. The basic URI is

<PROTOCOL>://<WEBSERVER>:<PORT>/adsweb/<LOCATION>/<API_VERSION>/<COLLECTION>

Currently the only supported API_VERISON is „v1“. By default, an HTTP GET operation to that URI returns an XML script. But you can also return the result set in JSON format (Javascript Object Notation), which is easier to read and browse than XML. For that, add the format as a parameter to the URI:

http://localhost:6272/adsweb/example_db/v1/Tasks?$format=json
Task table in json format
Task table in json format

There’s a plugin for Google Chrome available which formats the returned JSON string to a better readable format. This plugin, named JSONView, can be installed from the chrome extensions. Using that plugin, the resulting screen looks like this:

JSONView
JSONView

Conclusion


Advantage Web Platform is a great platform to enhance the reach of your database to operating systems that are not supported by the Advantage Client Engine. Using that Apache module enables you to write Advantage data driven applications for Android, iOS, and other mobile devices.

Advantage Web Platform
Markiert in:                 

6 Kommentare zu „Advantage Web Platform

  • Pingback:Advantage Delphi OData Client – Joachim Dürr softwareengineering

  • 1. März 2021 um 10:21 Uhr
    Permalink

    Do you know if the web platform is still available in version 12 ? We can’t find the adsweb.exe in the installation files or a download on the internet.
    The support of SAP isn’t very helpfull because we get our license for advantage database server form an local dealer in Belgium.

    Antworten
    • 1. März 2021 um 11:24 Uhr
      Permalink

      adsweb should still be part of the install. I’m not sure if it’s in 32 or 64 Bit package.
      But I wouldn’t recommend it any more. It’s outdated and thus prone for security issues.

      Antworten
  • 28. Juni 2022 um 15:40 Uhr
    Permalink

    Hallo Joachim,
    wir möchten mit einer Delphi11-Android-App auf ADS-Vers.12 zugreifen.
    Dazu haben wir das AdsWeb.Exe ausgeführt und den Apache-Server erstellt.

    1. http://localhost:6272 funktioniert!
    2. Im ARC kann ich die Connection local erstellen und die Tabellen öffnen (nach reindex)
    Jedoch kommen wir partout nicht im Browser (weder Edge noch Firefox) auf die Datenbank: nach Abfrage von Username und leerem Passwort kommt:
    Unauthorized
    This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn’t understand how to supply the credentials required.
    Ich habe schon in den Connection-Properties verschiedene Sachen ausprobiert; keine Chance…
    Haben wir was übersehen?
    Grüße aus Hannover
    Bernd

    Antworten
    • 28. Juni 2022 um 15:51 Uhr
      Permalink

      Hallo Bernd,
      ich würde die Finger von adsweb lassen. Der beruht auf einem alten Apache und ist damit potentiell unsicher!
      Schau Dir lieber an, ob Du nicht besser selbst was zusammenbaust (es gibt viele Grundgerüste für Webservices auf Basis zB von PHP) oder mit Embarcadero RADServer die Dienste zur Verfügung stellst. Damit bist Du auch vom Backend unabhängig.

      Antworten
      • 28. Juni 2022 um 16:52 Uhr
        Permalink

        Danke Joachim,
        danke erstmal für die schnelle response.
        Ist bei uns ne lokale Geschichte; also ist die Unsicherheit zu vernachlässigen.
        Für die RAD-Server-Dienste brauchen wir (glaube ich) eine Enterprise-Version…haben nur Pro.
        Schade, das es auch nicht per FireDAC funktioniert…

        Grüße aus Hannover
        Bernd

        Antworten

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert