This documentation supports the 9.1 to 9.1 Service Pack 3 version and its patches of BMC Atrium Core. The documentation for version 9.1.04 and its patches is available here.

To view the latest version, select the version from the Product version menu.

CreateInstance function

Creates a CI instance of the specified class.
If you create a diary attribute with a value (using DiaryValue ) as part of a new instance, the name, text, and timestamp of that diary entry are concatenated as a single string. The recommended method to avoid concatenating the diary entry is create the instance, get the instance, and then set the diary attribute value.

WSDL operation

<operation name="CreateInstance" parameterOrder="inargs">
	<input message="tns:CreateInstanceRequest"
		name="CreateInstanceRequest"/>
	<output message="tns:CreateInstanceResponse"
		name="CreateInstanceResponse"/>
	<fault message="tns:AtriumFault" name="AtriumFault"/>
</operation>

WSDL messages

<message name="CreateInstanceRequest">
	<part element="types:CreateInstance" name="inargs"/>
</message>
<message name="CreateInstanceResponse">
	<part element="types:CreateInstanceOutput" name="outargs"/>
</message>
<message name="AtriumFault">
	<part element="common:AtriumFault" name="errargs"/>
</message>

XSD schema

<element name="CreateInstance">
	<complexType>
		<sequence>
			<element name="lang" type="string"/>
			<element name="datasetId"  type="string"/>
		<element name="instanceInfo" type="common:CreateInstanceInfoIn" />
		<element name="extensions" type="common:ExtensionsList"
			nillable="true" />
		</sequence>
	</complexType>
</element>
<element name="CreateInstanceOutput">
	<complexType>
		<sequence>
			<element name="instanceId" type="string"/>
			<element name="status" type="common:StatusList"/>
			<element name="extensions" type="common:ExtensionsList" 
				nillable="true" />
		</sequence>
	</complexType>
</element>
<element name="AtriumFault">
	<complexType>
		<choice>
			<element name="serviceFault"
				type="tns:AtriumServiceFault" />
			<element name="backendFault"
				type="tns:AtriumBackendFault" />
		</choice>
	</complexType>
</element>

Input arguments


lang

The language of the product specific to the locale. If no language is specified, the default language is used.

datasetId

The unique identifier for the dataset.

instanceInfo

A list of instances. See SetInstanceInfoIn.

extensions

A list of extension types for the operation.

 


Return values


instanceId

The unique identifier for the new attribute.

status

A list of zero or more notes, warnings, or errors generated from a call of this operation.

extensions

A list of extension types for the operation.

 


Fault message


Fault message

See Fault message

Example

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