Creating a configuration item and populating the attributes from the extension table
SDM 17.x
This is a 2 steps approach. First, we must create the CI using the createAsset method (no extension attribute) and then use the updateObject to add the extension attributes. The extension attributes can't be passed during the creation of the CI.
Example using the OOTB Hardware.Server class (grc:300054/Hardware Family)
Step 1: Create the CI using createAsset method
<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>ID_obtained_using_login_method</sid> <attrVals> <string>name</string> <string>TestName</string> <string>description</string> <string>Test description</string> <string>class</string> <string>grc:300054</string> </attrVals> <attributes> </attributes> <createAssetResult></createAssetResult> <newAssetHandle></newAssetHandle> <newExtensionHandle></newExtensionHandle> <newExtensionName></newExtensionName> </ser:createAsset> </soapenv:Body></soapenv:Envelope>
Step 2: update the object (CI) created in the step above
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.ca.com/UnicenterServicePlus/ServiceDesk"> <soapenv:Header/> <soapenv:Body> <ser:updateObject> <sid>ID_obtained_using_login_method</sid> <objectHandle>har_serx:CONTACT_UUID</objectHandle> <attrVals> <!--1 or more repetitions:--> <string>printer</string> <string>test new</string> <string>phys_mem</string> <string>16GB</string> </attrVals> <attributes> <!--1 or more repetitions:--> <string>printer</string> <string>phys_mem</string> </attributes> </ser:updateObject> </soapenv:Body></soapenv:Envelope>
(the har_serx is the extension table for Hardware.Server and CONTACT_UUID is the ID of the CI created in step 1)