SOAP generated CI models are receiving incorrect values
search cancel

SOAP generated CI models are receiving incorrect values

book

Article ID: 415633

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager CA Service Desk Manager

Issue/Introduction

Creating a CI using the createAsset SOAP call and running this twice in a row with different values 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.ca.com/UnicenterServicePlus/ServiceDesk">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:createAsset>
         <sid>2096831460</sid>
         <attrVals>
            <!--Zero or more repetitions:-->
            <string>name</string>
            <string>TestCI1</string>

            <string>system_name</string>
            <string>TestSysName-1</string>

            <string>class</string>
            <string>grc:300178</string>

            <string>model.sym</string>
            <string>ModelA</string>

         </attrVals>
         <attributes>
            <string>persistent_id</string>
         </attributes>

      </ser:createAsset>
   </soapenv:Body>
</soapenv:Envelope>

 

The CI's being created are showing the model values propagating backwards through the past CI's.  

First CI "TestCI1" created with model.sym = ModelA 
Second CI "TestCI2" created with model.sym = ModelB
 
First CI "TestCI1" shows ModelB instead of ModelA on the classic Web UI, under CMDB Attributes / Inventory

Environment

Release: 17.3.x and 17.4.x

Cause

The SOAP call is attempting to leverage a dotted attribute for the model, "model.sym", which is unsupported.  Running this command post-execution will show that the model_uuid field is not being populated.

pdm_extract -f "Select id, resource_name, serial_number, model_uuid from ca_owned_resource"

Resolution

The SOAP call should be written to name the model attribute directly by its UUID value

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.ca.com/UnicenterServicePlus/ServiceDesk">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:createAsset>
         <sid>2096831460</sid>
         <attrVals>
            <!--Zero or more repetitions:-->
            <string>name</string>
            <string>TestCI1</string>

            <string>system_name</string>
            <string>TestSysName-1</string>

            <string>class</string>
            <string>grc:300178</string>

            <string>model</string>
            <string>08052E96A92C3442BE75E4105D36DD44</string>

         </attrVals>
         <attributes>
            <string>persistent_id</string>
         </attributes>

      </ser:createAsset>
   </soapenv:Body>
</soapenv:Envelope>

Additional Information

Similar to createObject, createAsset does not support the use of dotted attributes in the attrVals parameter list.