WBEM Solutions Bringing IT Together
Home Products professional services Training Support Resources About

Resources


Back to Knowledge Base page.

Date: 09/29/2004
Title: Instance Return Value Knowledge Base Article

Products: J WBEM Server 1.0.1
 
Operating Systems: ALL
Introduction

When instances are returned using CIM-XML, they contain the instance name (class name and key value pairs) as well as the instance.  In version 1.0 of the J WBEM Server, the key properties came from the instance itself. When a client requested an instance with only one property, the instance name was not complete with all the keys.

Resolution
The resolution is to ensure that every provider set the complete object path as part of the instance. Each provider must call the CIMInstance.setObjectPath(CIMObjectPath op) method and set the namespace, class name and all the key value pairs in the passed object path.  This enables each instance to contain only the information wanted in the instance while also containing the complete name of the instance (including namespace).
We will use the following call as an example:
wbemop -nq -s http://10.0.1.5/interop -u name -p pwd CIM_ObjectManager -pl Name ei

 
The issue is the propertyList that is sent along with the request. Since there are more key properties than just the Name property, the name of the instance needs to contain all keys, while the instance only contains the name. The XML response payload for the request above is included. Notice that even though the instance only includes the Name property, the InstanceName includes all the key properties.
 
<?xml version="1.0" encoding="UTF-8"?>

<CIM DTDVERSION="2.0" CIMVERSION="2.0">
  <MESSAGE ID="2004:8:28:9:1:45:56:2" PROTOCOLVERSION="1.0">
    <SIMPLERSP>
      <IMETHODRESPONSE NAME="EnumerateInstances">
        <IRETURNVALUE>
          <VALUE.NAMEDINSTANCE>
            <INSTANCENAME CLASSNAME="WBEMSolutions_ObjectManager">
              <KEYBINDING NAME="Name">
                <KEYVALUE VALUETYPE="string" TYPE="string">WBEM Solutions:1096208342149</KEYVALUE>
              </KEYBINDING>
              <KEYBINDING NAME="SystemCreationClassName">
                <KEYVALUE VALUETYPE="string" TYPE="string">WBEMSolutions_ComputerSystem</KEYVALUE>
              </KEYBINDING>
              <KEYBINDING NAME="SystemName">
                <KEYVALUE VALUETYPE="string" TYPE="string">unknown</KEYVALUE>
              </KEYBINDING>
              <KEYBINDING NAME="CreationClassName">
                <KEYVALUE VALUETYPE="string" TYPE="string">WBEMSolutions_ObjectManager</KEYVALUE>
              </KEYBINDING>
            </INSTANCENAME>
            <INSTANCE CLASSNAME="WBEMSolutions_ObjectManager">
              <PROPERTY NAME="Name" TYPE="string">
                <VALUE>WBEM Solutions:1096208342149</VALUE>
              </PROPERTY>
            </INSTANCE>
          </VALUE.NAMEDINSTANCE>
        </IRETURNVALUE>
      </IMETHODRESPONSE>
    </SIMPLERSP>
  </MESSAGE>
</CIM>

home | contact us | privacy policy
Copyright © 2002-2008 WBEM Solutions, Inc.
All Rights Reserved.