Example of using web services to create an instance of a CI
Allen Allbrook, the configuration manager with Calbro Services wants to create a CI having name MSWord belonging to the Product
class. Allen needs to create the instance of the CI in the BMC_Product
class where the datasetId is BMC.ADDM, and the name attribute is MSWord.
Request
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>IN-AllenA-W1_b7647fee09ea44a3af4363ad98212089</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">IN-AllenA-W1_b7647fee09ea44a</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<CreateInstance xmlns="http://atrium.bmc.com/2009/01/instances/types">
<loginInfo xmlns="" />
<datasetId xmlns="">BMC.ADDM</datasetId>
<instanceInfo xmlns="">
<classNameId>
<namespaceName>BMC.CORE</namespaceName>
<className>BMC_Product</className>
</classNameId>
<attributes>
<list>
<name>Name</name>
<value>
<stringValue>MSWord</stringValue>
</value>
</list>
</attributes>
</instanceInfo>
<extensions xmlns="" />
</CreateInstance>
</soapenv:Body>
</soapenv:Envelope>
The response is shown as follows:
Response
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<typ:CreateInstanceOutput xmlns:typ="http://atrium.bmc.com/2009/01/instances/types">
<instanceId>xxxx</instanceId>
<status/>
<extensions xsi:nil="true"/>
</typ:CreateInstanceOutput>
</soapenv:Body>
</soapenv:Envelope>
Was this page helpful? Yes No
Submitting...
Thank you
Comments
Log in or register to comment.