Actual State Web Service API

The Actual State Web Service API is used primarily by the Service Manager to retrieve Actual State information for a specific CMDB ID or Global ID and a specific customer ID. The API finds a matching query under the folder Integration/SM Query and executes the TQL with the CMDB ID or Global ID as a condition, and returns the output of the query.

Web Service URL: http://[machine_name]:8080/axis2/services/ucmdbSMService

Web Service Schema: http://[machine_name]:8080/axis2/services/ucmdbSMService?xsd=xsd0

Flow

When the API method is called, it tries to find an appropriate Query in the Integration/SM Query folder. It tries to match the type of the requested CMDBID/GlobalID with one of the queries in the latter folder first by looking for a QueryElement with the name Root, and if one is not found it tries to use any QueryNode of the same type as the requested CMDBID/GlobalID. Once an appropriate Query and QueryNode are found, it puts the CMDBID/GlobalID as a condition on the QueryNode and executes the Query. The result is then returned to the caller of the API.

Manipulating the Result Using Transformations

In some cases you may want to apply additional transformations to the resulting XML (for example, to sum up the sizes of all the disks and add that sum as an additional attribute to the CI). To add additional transformations on the TQL results, place a resource called [tql_name].xslt in the adapter configuration as follows: Adapter Management > ServiceDeskAdapter7-1 >Configuration Files > [tql_name].xslt.

Logs for the Actual State Web Service API

The log configuration for UCMDB resides at: UCMDBServer/Conf/log in the various *.properties files.

To view logs of the SM Actual State flow:

  1. Open the cmdb_soaapi.properties file and change the log level to DEBUG as follows: loglevel=DEBUG.
  2. Open the fcmdb.properties file and change the log level to DEBUG as follows: loglevel=DEBUG.
  3. Wait 1 minute for the server to retrieve the changes.
  4. Run the Actual State from the SM.
  5. View the following log files at UCMDBServer/Runtime/log:

    • cmdb.soaapi.log

    • fcmdb.log

Enabling Actual State of Replicated CIs after Changing Root Context

If you have changed the root context that is used to access UCMDB, you must make the following configuration changes to enable Actual State of Replicated CIs:

  1. Under UCMDBServer\deploy\axis2\WEB-INF, open the file web.xml.
  2. Add the following servlet init parameter to AxisServlet (paste these four lines after line 28):

    <init-param>
    <param-name>axis2.find.context</param-name>
    <param-value>false</param-value>
    </init-param>

    This setting prevents Axis2 from trying to calculate the context root and tells it to look for it explicitly in axis2.xml.

  3. Under UCMDBServer\deploy\axis2\WEB-INF\conf, open the file axis2.xml.
  4. At line 58, remove comments from the parameter contextRoot, and edit it as follows:

    <parameter name="contextRoot" locked="false">test/axis2</parameter>

    (where test is the new root context in cmdb.xml).

    Note There is no slash at the beginning of test/axis2.