This document was generated from CDN thread
Created by: null on 04-02-2004 03:02:44 PM
I am using a Generic Decision element. I could like to use the XML API. According to the documentation two POST arguments are sent to the URI. These are named "inputs" and "settings". When parsing these should I be parsing inputs.xml and settings.xml?
Subject: RE: XML API
Replied by: Michael Bochynski on 06-02-2004 04:30:43 PM
Hi,
The XML API is provided for those developers who want to utilize other programming languages to interact with Audium software. It works by first entering a URI to the entity that will use the XML API in the Audium Builder the defines the source of the decision element (or whatever else you are using the XML API with). I will call this from now on the "Receiver", it can be an ASP page, CGI script, PHP page, etc.
The second step is to build the Receiver to produce the XML Audium specifies you need to return to the Audium system. If your Receiver requires the use of real-time information such as the ANI or some element data, it must be designed to receive the two HTTP POST arguments you mentioned, which are passed to the Receiver by the Audium system. These two arguments contain XML documents directly in the POST parameter, they are not files. You just get the argument itself and pass its contents to an XML parser or if you are looking for some specific piece of information, you can just search the test for that yourself.
To understand this further, just think of how a web form works. You have a large text box that your viewers enter some long text (like an address or a comment). When the viewer presses the Submit button on the web form, it sends all the data entered by the viewer via HTTP POST arguments. This data can then be acted upon or stored. The contents of the text box is not a file, it is just part of the request sent to the Receiver.
The more detailed explanation you can find in HTTP specification, or in tutorials on how to access arguments passed via POST or GET with the language you are building the Receiver in.
Hope this helps!