Structure of a WAAPI request
A WAAPI request is an XML document that contains an optional
XML declaration followed by the <methodCall> root
element. A request has a number of additional characteristics that
you need to bear in mind.
The XML declaration
Optionally, you can begin a WAAPI request with an XML declaration. For this release of the Web GUI the declaration is as follows:
<?xml version="1.0" encoding="UTF-8" ?> The <methodCall> root element
The root element holds the content of the request. For tool, prompt, and metric requests, the root element also defines a namespace.
Basic form of the root element
The basic form of the root element is as follows:
<methodCall>
</methodCall>The root element for tool, prompt, metric, and relationship requests
For tool, prompt, metric, and relationship requests, the form of the root element is as follows:
<methodCall xmlns:type=namespace-url>
</methodCall>Where type is the type of request (tool, prompt, metric, or relationship) and namespace-url is the fully qualified URL for the namespace. Only the tool, prompt, metric, and relationship requests require a namespace URL.
The namespace URLs for prompt, tool, metric, and relationship requests are described in the following table.
| Type of request | Namespace URL |
|---|---|
| Tool | "http://www.ibm.com/tivoli/netcool/webtop/tools/2.1" |
| Prompt | "http://www.ibm.com/tivoli/netcool/webtop/prompts/2.2" |
| Metric | "http://www.ibm.com/tivoli/netcool/webtop/metrics/7.3.1" |
| Relationship | "http://www.ibm.com/tivoli/netcool/webtop/relationships/7.4" |
Content of the root element
The root element, whatever form it takes, contains
one or more <method> elements. Each of these elements
contains a request to manipulate an item of Web GUI data.
Later sections set out the format and content of the <method> element
for each type of data that WAAPI can operate on. The <method> element
contains a methodName attribute that defines the
type of data item and the operation to perform on that data. In the <method> element
are child elements that define the item of data.
For example,
when the methodCall attribute has the value view.createView the <method> element
contains one or more <view> elements each of which
defines the characteristics of a view to add to the collection of Web GUI views.
The root element can contain method
calls for any mix of Web GUI data
items. When the element contains any combination of tool, prompt,
metric, and relationship requests, include each of the corresponding
xmlns attributes in the <methodCall> element.
For
example, if a <methodCall> element contains <method> elements
for views, tools, and prompts, specify the <methodCall> element
as follows:
<methodCall xmlns="http://www.ibm.com/tivoli/netcool/webtop/tools/2.1"
xmlns="http://www.ibm.com/tivoli/netcool/webtop/prompts/2.2" >
<!-- <method> elements appear here -->
</methodCall>