Axiell WebAPI home page > Documentation > XML payload processing support

XML payload processing support

The Axiell WebAPI 3.0.21344.1 and higher support the processing of XML payloads to extract their data to write or update Axiell database records using an adapl.
Imagine for example some media ingest software which generates metadata about the result of an ingest action, in the form of a snippet of raw XML or JSON (the latter supported from WebAPI version 3.7.1.3123), with the purpose of having some or all of the information in such a file processed in certain Axiell database records, maybe in the media records that were just created or in object records linking to those media records or maybe in some new event records.
The Axiell WebAPI is now capable of requesting such processing with the load command and the payload argument. The processing of the XML file itself however, must be done via a custom adapl. A new <payloadConfiguration> section in the WebAPI adlibweb.xml configuration file specifies the Axiell database name and (location of) the adapl to use, tying it all together. For example (include the section underneath the <webConfiguration> node):

<payloadConfiguration name="my_payload_type1" type="XML">
    <database>collect</database>
    <adapl>C:\Data\Axiell\model452\adapls\myadapl</adapl>
</payloadConfiguration>
  • name is the identifier of this payload configuration and it's this identifier that must be passed as the payload argument in the WebAPI request
  • type is the type of the expected payload data (XML or JSON)
  • database is the name of the database to run this payload for, e.g. collect or document
  • adapl is the name of the custom adapl that should run and parse the payload

So a raw XML or JSON file posted with a wwwopac.ashx?command=load&payload=my_payload_type1 request in this example would process the posted payload file using a custom adapl for a specific database, as set in the adlibweb.xml.
Remember to set <debug>true</debug> here as well if you'd like errorm messages from the adapl to end up in the WebAPI response.

When a WebAPI load request for an available payload is executed, in memory a new blank record is created for the specified database and the adapl is run for that record (which can be saved or not by the adapl), so besides generating errorm messages you can use the adapl to assign data from XML nodes to field tags in the record as you would normally assign values to field tags in e.g. a before-storage adapl. You can also (regardless of what you do with the new record in memory) use the ADAPL FACS functionality to read, update or create records in FACS databases that you specify using regular FACS definitions in the adapl. Click here to read more about programming such an adapl.