Cisco Cisco Customer Voice Portal 8.0(1) Developer's Guide

Page of 122
Notes concerning which folder to use:
Any class that refers to Unified CVP-specific API classes cannot be deployed in the 
util
folder. If the class is application-specific, it must be placed in the 
application
 folder of
that application. If the class is to be shared across all applications, it must be placed in the
common
 folder of VXML Server.
The classes in the 
util
 folder will not be reloaded when the application is updated using the
updateApp
 administration script. If this behavior is not desired or the utility libraries are
frequently updated, place these files in the 
application
 folder. See 
 (http://www.cisco.com/en/US/
products/sw/custcosw/ps1006/products_user_guide_list.html), Chapter 3, in the section
Updating Common Classes, for more information.
Utility classes that do not refer to Unified CVP classes at all (such as third-party libraries)
can be placed anywhere within the CLASSPATH of the application server. For example, on
the Apache Jakarta Tomcat application server, a library for connecting to a mainframe system
can be placed in 
TOMCAT_HOME/common/lib
 rather than any Unified CVP directory.
XML API
The philosophy behind the XML API is to provide as much of the functionality found in the
Java API as possible in a way that can be accessed by non-Java developers. This is managed
by using XML, which can be produced and parsed easily, and by using HTTP connections,
which can be handled by many different programming languages. Interpreted languages such
as Perl or PHP are just as effective in interfacing using this API as other languages such as ASP
or CGI via C++.
The API works in a similar fashion as the Java API. VXML Server creates one or more XML
documents and places their contents in POST arguments in an HTTP request. These documents
contain the same environment information available through the Java Session API classes. This
request is sent to a developer-specified URL whose purpose is to produce an XML document
and return it as the HTTP response. As with the Java API, the XML documents returned by
various components differ to reflect the different functionality each component possesses. All
these XML documents comprise the XML API. The DTDs for the XML API documents are
found in the 
dtds
 directory in VXML Server. The DTDs exist as a reference, a DOCTYPE
line is not required in either request or response XML documents. The format of each XML
document will be described in detail in each component’s section in this document.
A component using the Java API has the ability to access methods that interface with VXML
Server whenever needed. The XML API, since it is executed over HTTP in a request / response
fashion does not have that luxury. VXML Server does not know in advance what session
information the component will need. Providing a separate interface for every piece of
information desired would cause unnecessary overhead since a component could potentially
access this information dozens of times, each time requiring a new HTTP request and response.
To resolve this issue, VXML Server sends to the component all information in several XML
documents passed as POST parameters. While this may seem like a lot to put into a single
document, especially if the component does not need more than a few pieces, a typical application
Programming Guide for Cisco Unified CVP VXML Server and Cisco Unified Call Studio Release 8.0(1)
14
Chapter 2: Unified CVP API Introduction
XML API