Avaya Logo

Previous Topic

Next Topic

Book Contents

Book Index

Performing queries and updates

There are basic steps performed by a Avaya IR application for queries and updates.

Note that the Vonetix functions discussed in the steps below, unless otherwise mentioned, will return a 0 if successful, or a negative number if unsuccessful. See the Vonetix Return Code Table in the applicable Vonetix Technical Training Guide or Data Channel Guide.

  1. Prepare the original XML document.
    1. Load the XML template.

      Use the Vonetix vntxLoadDoc(SESSIONNAME, FILENAME) function, where the argument FILENAME includes the path to the template from the root directory.

    2. Add content to one or more elements in the document.

      This involves using the Vonetix vntxSetTag (SESSIONNAME, TAGNAME, TAGNUMBER, TAGVALUE) function for each element identified by the arguments TAGNAME and TAGNUMBER. The content of the element is substituted for TAGVALUE.

  2. Prepare form data for the HTTP request.

    HTTP request form data is used to log on to Siebel eBusiness, identify the XML document, and tell Siebel eBusiness what to do.

    This form data consists of one or more fields that are logically tied together by a session name, and are each created using the Vonetix vntxSetFD(SESSIONNAME, FIELDNAME, FIELDVALUE) function, where the argument FIELDNAME is the field's name, and the argument FIELDVALUE is the field's value.

    Each of the following fields needs to be defined:

  3. Convert the original XML document into an encoded form data value.

    The XML document must itself be turned into form data before being sent by Vonetix. The Vonetix VntxSetDocFD ( SESSIONNAME, name ) function does this, where name is "SWEExtData".

  4. Send the form data.

    The form data sent to Siebel eBusiness consists of the XML document created from the XML template, coupled with the HTTP request form data that was created in Prepare form data for the HTTP request.

    Use the Vonetix vntxPostDoc(SESSIONNAME, URL) function, where the argument URL is the URL of the Website with the Siebel eBusiness data.

    An error code will be returned by Vonetix if Siebel eBusiness has not responded within 20 seconds of the HTTP request.

  5. Save the incoming XML document. (This step is optional, usually for debugging purposes.)

    Siebel eBusiness will respond to the POST command by sending a document to Avaya IR. The received document can be saved regardless of whether the Avaya IR application is doing a query or an update.

    Use the Vonetix vntxStoreDoc(SESSIONNAME, FILENAME) function, where the argument FILENAME refers to the path and name you choose for the file that will be stored.

  6. Process the received XML document.

    Extract the content of each element of interest. This will certainly be done during a query, but may also be done after an update.

    Use the Vonetix vntxGetTag(SESSIONNAME, TAGNAME, TAGNUMBER, TAGTEXT) function. TAGTEXT is the name of the variable that will store the content.

  7. Clear form data.

    After performing a query or update, the form data encoded XML document and/or HTTP request form data may need to be cleared. This action will not remove data saved in variables and stored XML documents.

© 2006 Avaya Inc. All Rights Reserved.