Forum Discussion
pradnya2221985
13 years agoOccasional Contributor
here is the example request and response.My project is asset management. whatever assets such as operating system, distributes server present in organisation are included in this. Our task is to find the relation between these. All these configuration items are related to each other by relationship IS child of and is parent of. Our task is to find out if one of the CI type is down then which other ci types are affected.
Now here is the tricky part. for below DS with id '1' and relation is child of , there are 3 ci types related to this id which we get in response. now for id '1' the count in response is '3' but for other id's it may vary . it may be 4,5,6 whatever.
so in this case we have to pass different id's , relationship, ci types in request which I wanted to parametrized. and response we get dynamic depending on input so we can not use normal datasource as excel sheet will be quite long then.
so for output we have to use actual database. and then I have to verify response for each id, relationship and related ci type to the actual database contents.
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cms="http://schemaname.net/cmsws/">
<soapenv:Header/>
<soapenv:Body>
<cms:RelatedConfigurationItemCriteria>
<ConfigurationItemId>1</ConfigurationItemId>
<configurationItemType>Distributed server</configurationItemType>
<relationship>is child of</relationship>
<FilterList>
</FilterList>
</cms:RelatedConfigurationItemCriteria>
</soapenv:Body>
</soapenv:Envelope>
Response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:RelatedConfigurationItemList xmlns:ns2="http://schemaname.net/cmsws/">
<ConfigurationItem>
<name>abc</name>
<id>2</id>
<type>OPERATING SYSTEM</type>
<relationship>IS PARENT OF</relationship>
<ConfigurationItemList>
<ConfigurationItem>
<name>xyz</name>
<id>3</id>
<type>APPLICATION</type>
<relationship>IS PARENT OF</relationship>
<ConfigurationItemList/>
</ConfigurationItem>
</ConfigurationItemList>
</ConfigurationItem>
<ConfigurationItem>
<name>xxx</name>
<id>4</id>
<type>DISTRIBUTED SERVER</type>
<relationship>IS CHILD OF</relationship>
<ConfigurationItemList/>
</ConfigurationItem>
<ConfigurationItem>
<name>zzz</name>
<id>5</id>
<type>DISTRIBUTED SERVER</type>
<relationship>IS PARENT OF</relationship>
<ConfigurationItemList/>
</ConfigurationItem>
</ns2:RelatedConfigurationItemList>
</soap:Body>
</soap:Envelope>
Now here is the tricky part. for below DS with id '1' and relation is child of , there are 3 ci types related to this id which we get in response. now for id '1' the count in response is '3' but for other id's it may vary . it may be 4,5,6 whatever.
so in this case we have to pass different id's , relationship, ci types in request which I wanted to parametrized. and response we get dynamic depending on input so we can not use normal datasource as excel sheet will be quite long then.
so for output we have to use actual database. and then I have to verify response for each id, relationship and related ci type to the actual database contents.
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cms="http://schemaname.net/cmsws/">
<soapenv:Header/>
<soapenv:Body>
<cms:RelatedConfigurationItemCriteria>
<ConfigurationItemId>1</ConfigurationItemId>
<configurationItemType>Distributed server</configurationItemType>
<relationship>is child of</relationship>
<FilterList>
</FilterList>
</cms:RelatedConfigurationItemCriteria>
</soapenv:Body>
</soapenv:Envelope>
Response:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:RelatedConfigurationItemList xmlns:ns2="http://schemaname.net/cmsws/">
<ConfigurationItem>
<name>abc</name>
<id>2</id>
<type>OPERATING SYSTEM</type>
<relationship>IS PARENT OF</relationship>
<ConfigurationItemList>
<ConfigurationItem>
<name>xyz</name>
<id>3</id>
<type>APPLICATION</type>
<relationship>IS PARENT OF</relationship>
<ConfigurationItemList/>
</ConfigurationItem>
</ConfigurationItemList>
</ConfigurationItem>
<ConfigurationItem>
<name>xxx</name>
<id>4</id>
<type>DISTRIBUTED SERVER</type>
<relationship>IS CHILD OF</relationship>
<ConfigurationItemList/>
</ConfigurationItem>
<ConfigurationItem>
<name>zzz</name>
<id>5</id>
<type>DISTRIBUTED SERVER</type>
<relationship>IS PARENT OF</relationship>
<ConfigurationItemList/>
</ConfigurationItem>
</ns2:RelatedConfigurationItemList>
</soap:Body>
</soap:Envelope>
Related Content
Recent Discussions
- 16 hours agogroovyguy