this is my new code to create new config item via SOAP with php
Code: Select all
$ci_name = "wlan 3 pelanggan";
try {
/* tambahkan/add config item data pop */
$ConfigItemID = $this->client->__soapCall("Dispatch", array($this->user, $this->pass, "ITSMConfigItem", "ConfigItemAdd",
"ClassID", 33, # class network (35), hardware (33)
"UserID" , 1
));
/* tambahkan/add data version dari config item */
$this->client->__soapCall("Dispatch", array($this->user, $this->pass, "ITSMConfigItem", "VersionAdd",
"ConfigItemID" , $ConfigItemID,
"Name" , $ci_name,
"DefinitionID" , 2, # network (4), hardware(2)
"DeplStateID" , 42, # production
"InciStateID" , 13, # incident
"UserID" , 1,
"XMLData" , Array
(
"0" => "",
"1" => array
(
"Version" => Array
(
"0" => "",
"1" => array
(
"SerialNumber" => Array
(
"0" => "",
"1" => array
(
"TagKey" => "[1]{'Version'}[1]{'SerialNumber'}[1]",
"Content" => ""
)
),
"WarrantyExpirationDate" => Array
(
"0" => "",
"1" => array
(
"TagKey" => "[1]{'Version'}[1]{'WarrantyExpirationDate'}[1]",
"Content" => "2012-12-18"
)
),
"TagKey" => "[1]{'Version'}[1]",
"Vendor" => Array
(
"0" => "",
"1" => array
(
"TagKey" => "[1]{'Version'}[1]{'Vendor'}[1]",
"Content" => ""
)
),
"Model" => Array
(
"0" => "",
"1" => array
(
"TagKey" => "[1]{'Version'}[1]{'Model'}[1]",
"Content" => ""
)
),
"Owner" => Array
(
"0" => "",
"1" => array
(
"TagKey" => "[1]{'Version'}[1]{'Owner'}[1]",
"Content" => "Test VPN WoW 436"
)
),
"Type" => Array
(
"0" => "",
"1" => array
(
"TagKey" => "[1]{'Version'}[1]{'Type'}[1]",
"Content" => 59
)
),
"Description" => Array
(
"0" => "",
"1" => array
(
"TagKey" => "[1]{'Version'}[1]{'Description'}[1]",
"Content" => ""
)
)
)
),
"TagKey" => "1"
)
)
));
/* tambahkan/add data configuration Config Item*/
return true;
} catch (SoapFault $fault) {
return false;
}
and now, i can create new hardware config item via soap with php.
You do not have the required permissions to view the files attached to this post.