SOAP and XSLT Dynamic Applications must include one or more requests that define how SL1 should request data from a device. Each request specifies an operation that will gather a response from the device.
Each collection object in a SOAP or XSLT Dynamic Application is associated with a request. The collection object specifies how to parse a data point from the response. A single request can be used to populate multiple collection objects.
For SOAP Dynamic Applications, a request specifies the POST content that SL1 uses to perform the request. The associated collection objects are parsed from the response.
For XSLT Dynamic Applications, a request specifies:
- An XSL transformation that SL1 applies to an XML document that contains the collected values from the previous requests. The result of this transformation is used as the POST content that SL1 uses to perform the request.
- A second XSL transformation that SL1 applies to the response from the device. The result of this transformation must be in a specific format from which SL1 parses the associated collection objects.
Use the following menu options to navigate the SL1 user interface:
- To view a pop-out list of menu options, click the menu icon (
).
- To view a page containing all of the menu options, click the Advanced menu icon (
).
Viewing the Requests in a Dynamic Application
To view the existing requests in a SOAP or XSLT Dynamic Application:
- Go to the Dynamic Applications Manager page (System > Manage > Applications).
- Find the Dynamic Application you want to view the requests for. Select its wrench icon (
). The Dynamic Applications Properties Editor page is displayed.
- Select the Dynamic Applications Request Editor and Registry page is displayed. The Request Registry pane at the bottom of the page displays the following information about each request: tab. The
- Request Name. The name of the request.
- State. The state of the request. Possible values are:
- Enabled. SL1 will perform this request during collection for this Dynamic Application.
- Disabled. SL1 will not perform this request during collection for this Dynamic Application.
- Sequence. The order in which the requests in this Dynamic Application will be performed.
- ID. The unique ID assigned to the request by SL1. The unique ID will always start with "req_".
- Date Edit. The last time a user edited this request.
Creating a Request
To define a request for a SOAP or XSLT Dynamic Application:
- Go to the Dynamic Applications Manager page (System > Manage > Applications).
- Locate the Dynamic Application for which you want to define a request. Select its wrench icon (
). The Dynamic Applications Properties Editor page is displayed.
- Select the Dynamic Applications Request Editor and Registry page is displayed. tab. The
- Supply values in the following fields:
- Request Name. Enter a name for the request.
- Execution Sequence. Specifies the order in which SL1 should perform the requests in this Dynamic Application Select a numeric value in this field. The request with the lowest Execution Sequence value will be performed first during collection, then the request with the next lowest Execution Sequence value, etc.
- Active State. Specifies whether SL1 should perform this request during collection for this Dynamic Application. Choices are:
- Enabled. SL1 will perform this request during collection for this Dynamic Application.
- Disabled. SL1 will not perform this request during collection for this Dynamic Application.
- Depending on the type and configuration of the Dynamic Application, define the request code:
- If you are creating a request for a SOAP Dynamic Application, supply code in the SOAP Request Code. This will be the POST content that SL1 will use for this request. You can use substitution characters in the request code.
- If you are creating a request for an XSLT Dynamic Application that does not consume cached responses, supply code in the XSLT Request Code and XSLT Parser Code fields. For a full description of these fields, see the Defining XSLT Request Code and Defining XSLT Parser Code sections.
- If you are creating a request for an XSLT Dynamic Application that consumes cached responses, supply a value in the Cached XSLT Request field and supply code in the XSLT Parser Code field. For a full description of these fields, see the Defining XSLT Request Code and Defining XSLT Parser Code sections.
- Select the button.
If a collection object that has a Class Type of [109] SOAP/XSLT Session ID is associated with a request, the request is executed only under certain conditions. For more information about Session ID collection objects, see the Collection Objects section.
Defining XSLT Request Code
If your Dynamic Application has No Caching or Cache Results selected in the Caching drop-down list in the Dynamic Applications Properties Editor page, you must supply an XSL transformation in the XSLT Request Code field.
If your Dynamic Application has Consume Cached Results selected in the Caching drop-down list in the Dynamic Applications Properties Editor page, you must select a cached XSLT request in the Cached XSLT Request field.
The XSLT Request Code Field
When SL1 performs collection for an XSLT Dynamic Application, SL1 generates the POST content for each request by applying the XSL transformation you supply in the XSLT Request Code field to an XML document. The XML document contains the values collected for collection objects that have already been collected by the Dynamic Application during this poll period.
If your Dynamic Application will be used with a credential that specifies an HTTP GET request, the result of the transformation specified in this field will not be used. However, SL1 will still apply the supplied XSL transformation to the XML document that contains the collected values. You must always supply a valid transformation in the XSLT Request Code field.
You must supply a valid XSL transformation in the XSLT Request Code field. SL1 will apply the specified XSL transformation to an XML document that has the following structure:
<objects>
<o_XXXX>
<i_Y></i_Y>
<i_Z></i_Z>
.
.
</o_XXXX>
<o_AAAA>
<i_B></i_B>
<i_C></i_C>
.
.
</o_AAAA>
</objects>
Where:
- o_XXXX and o_AAAA are collection object ID's
- i_Y and i_Z are indexes associated with values in the list of values collected for collection object o_XXXX.
- i_B and i_C are indexes associated with values in the list of values collected for collection object o_AAAA.
The XML file of objects contains only objects collected from other XSLT requests in the same polling period on the same device. For example, the XML file provided to the XSLT request with an Execution Sequence of "2" would contain all the objects collected in the same polling period from the XSLT request with an Execution Sequence of "0" and all the objects collected in the same polling period from the XSLT request with an Execution Sequence of "1". The XML file provided to the XSLT request with an Execution Sequence of "0" will contain no collected objects.
You can use the substitution characters described in the Substitution Characters section in your XSLT Request Code.
The Cached XSLT Request Field
The Cached XSLT Request displays all XSLT requests defined in Dynamic Applications that have Cache Results selected in the Caching drop-down list in the Dynamic Applications Properties Editor page.
To generate the XML document that contains the collection objects associated with this XSLT request, SL1 transforms the currently cached response for the XSLT request you select in this field using the XSLT Parser Code defined for this XSLT request.
Defining XSLT Parser Code
The XSLT Parser Code for an XSLT request is XSL transformation that will be used by SL1 to transform the response of the SOAP request. SL1 parses the collection objects associated with the request from the transformed response.
In the XSLT Parser Code field, you must supply an XSL transformation that transforms the response from the device in to an XML document with the following structure, where column_1 and column_2 are element names.:
<response>
<row>
<column_1></column_1>
<column_2></column_2>
.
.
</row>
<row>
<column_1></column_1>
<column_2></column_2>
.
.
</row>
</response>
The element names are used by SL1 to parse collection object values from the XML document.
Each "<row>" block specifies an entry in the list of collection objects. For example, if the transformed response looks like this:
<response>
<row>
<label>Label 1</label>
<value>10</label>
</row>
<row>
<label>Label 2</label>
<value>20</label>
</row>
<row>
<label>Label 3</label>
<value>30</label>
</row>
</response>
A list of three values (Label 1, Label 2, and Label 3) will be collected for the collection object associated with the label element.
A list of three values (10, 20, and 30) will be collected for the collection object associated with the value element.
You can use the substitution characters described in the Substitution Characters section in your XSLT Parser Code.
Substitution Characters
You can include substitution characters in SOAP Request Code, XSLT Request Code, and XSLT Parser Code. Depending on the type of substitution character that you use, SL1 will replace the substitution character with:
- The value of a collected object.
- A value specified in the associated credential.
- A property of the component device for which collection is being performed.
Substitution characters for collected objects can be used only in SOAP Request Code.
Collection Object Substitution Characters
In SOAP Request Code, you can include the ID of one or more collection objects in the same Dynamic Application. All collection object IDs begin with "o_" (lowercase "oh", underscore), e.g. "o_123". To use a collection object ID in SOAP Request Code, the collection object must:
- Be associated with a request that has a lower Execution Sequence setting than the request that uses the collection object in the SOAP Request Code.
- Collect a single value, not a list of values.
Substitution Characters from Credentials
SOAP/XML credentials can specify up to four substitution characters that can be used in SOAP Request Code, XSLT Request Code, or XSLT Parser Code.
When you use substitution characters from a credential in SOAP Request Code, XSLT Request Code, or XSLT Parser Code, you must ensure that the credential(s) that are used with the Dynamic Application define values for these substitution characters:
- %1. SL1 will supply the value specified in the Embed Value [%1] field for the credential associated with the Dynamic Application.
- %2. SL1 will supply the value specified in the Embed Value [%2] field for the credential associated with the Dynamic Application.
- %3. SL1 will supply the value specified in the Embed Value [%3] field for the credential associated with the Dynamic Application.
- %4. SL1 will supply the value specified in the Embed Value [%4] field for the credential associated with the Dynamic Application.
Substitution Characters from Component Devices
In SOAP and XSLT Dynamic Applications that collect data from component devices, you can use the following variables in the SOAP Request Code, XSLT Request Code, or XSLT Parser Code:
- %C. Distinguished name. SL1 will supply the distinguished name of the component device SL1 is currently collecting data from.
- %N. Device name. SL1 will supply the device name of the component device SL1 is currently collecting data from.
- %U. Unique identifier. SL1 will supply the unique identifier of the component device SL1 is currently collecting data from.
For more information about Dynamic Component Mapping, see
Editing a Request
To edit a request in a SOAP or XSLT Dynamic Application, perform the following steps:
- Go to the Dynamic Applications Manager page (System > Manage > Applications).
- Find the Dynamic Application you want to edit. Select its wrench icon (
). The Dynamic Applications Properties Editor page is displayed.
- Select the Dynamic Applications Request Editor and Registry page is displayed. tab. The
- In the Request Registry pane at the bottom of the page, locate the request you want to edit. Select the wrench icon (
) for the request you want to edit.
- The fields in the top pane will be populated with the saved values for the selected request. Edit the values in one or more fields. For a description of each field, see the Creating a Request section.
- Select the button to save your changes to the request. Select the button to save the changes as a new request.
Deleting a Request
To delete a request from a SOAP or XSLT Dynamic Application, perform the following steps:
- Go to the Dynamic Applications Manager page (System > Manage > Applications).
- Find the Dynamic Application you want to edit. Select its wrench icon (
). The Dynamic Applications Properties Editor page is displayed.
- Select the Dynamic Applications Request Editor and Registry page is displayed. tab. The
- In the Request Registry pane at the bottom of the page, locate the request you want to delete. Select its delete icon (
). The request is deleted from SL1. You must edit all collection objects that were associated with the request to associate those collection objects with other requests in the Dynamic Application.