Specific fields for SOAP attributes
In the Attribute Information window, there are two fields for SOAP attributes that define how data is collected from the SOAP response.
The Attribute Type field
can be any value from a list that controls the information about the
response that is returned. Some attribute types require a value in
the Type Value field. The default
attribute type is XPath Query, which runs an XPath query against the
SOAP server response content. The type value is the XPath query that
is run. The following table describes all of the attribute types
and the type value when one is required:
| Attribute type | Description | Type value | Returned data type | Differences with FTP and file protocols |
|---|---|---|---|---|
XPath Query |
Runs an XPath query on the content that is returned from a URL connection. The query must be written to return data useful for an attribute, not a list of nodes. | The XPath query to run against the content that is obtained from a URL connection. If a row selection query was defined, this XPath query must be relative to the row selection query. | The data that is returned can be a string, a numeric, or a timestamp value. The Agent Builder browser for SOAP generally detects the correct data type for the attribute from the data that is being browsed. If the data is in XML DateTime format, you can specify timestamp as the attribute type and the agent converts the value to a Candle Timestamp. | None |
Response Time |
The amount of time in milliseconds that it took to download the content from the requested URL. | None | Integer (number of milliseconds) | None |
Response Message |
The HTTP response message that is returned by the server. | None | String | The response message applies only if the URL uses the HTTP or HTTPS protocols. |
Response Code |
The HTTP response code that is returned by the server. | None | Integer | The response code applies only if the URL uses the HTTP or HTTPS protocols. It is always 0 for file or FTP URLs. |
Response Length |
The size of the content in bytes that was downloaded from the requested URL | None | Integer (size in bytes) | None |
Response Header |
The response header can be used to retrieve a value from one of the URL response header fields. The argument specifies which field is requested. | The response header field to collect. | String | Generally FTP and file protocols do not have any headers that can be collected. |
Request URL |
The connection was made to this URL. All of the response keywords provide information about the connection to this URL. The XPath Query can be used to obtain information that is obtained from the content that is returned by accessing this URL. | None | String | None |
XPath options
Using
XML Path Language, you can select nodes from an XML document. A few
of the possible uses of XPaths for the SOAP data sources include:
- Using predicates in the XPath to identify the XML elements that
correspond to rows of data in the IBM® Tivoli® Monitoring attribute group.
You can use predicates in the XPath that maps XML elements or attributes
to Tivoli Monitoring attributes,
as in the following example:
Where there are multiple location steps in the XPath, each location step can contain one or more predicates. The predicates can be complex and contain boolean values or formula operators. For example:Stat[@name="URLs"]/CountStatistic[@name="URIRequestCount"]/@count//PerformanceMonitor/Node/Server[@name="server1"]/Stat/Stat/Stat[@name= "Servlets"]/Stat - Including node set functions in the XPath, if a row contains multiple
XML elements of the same type. And if the position of an XML element
in the node list determines the Tivoli Monitoring
attribute the element maps to. Examples of node set functions are,
position(),first(),last(), andcount(). - Doing simple data transformation, such as substring. If you specify
the following substring:
the XPath returns the first three characters of the XML element, myXMLElement.substring(myXMLElement,1,3)
(.., as in the following
example: /../OrganizationDescription/OrganizationIdentifier