object references passed to methods

Bug ID:176
Project:Openwsman
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:fixed
Description

Looks like openwsman doesn't support Object references being passed in as method arguments. It converts the 'reference' type to a 'string' type. Is this correct ? From the code the wsman_get_method_args function stuffs the method argument hash table with just the text of the high level XML element (the parameter name) and converts the element data into a text string before call SFCC.

So, are any parameter types other than strings supported at this point ?

Here's what I am seeing....

---------------- Input to openwsman -------------------------

<s:Envelope>

<s:Header>

 <a:To>http://10.60.2.63:8889/wsman</a:To>

 <w:ResourceURI s:mustUnderstand="true">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/root/cimv2/CIM_VirtualSystemManagementService</w:ResourceURI>

<a:ReplyTo>

 <a:Address s:mustUnderstand="true">http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</a:Address>

 </a:ReplyTo>

 <a:Action s:mustUnderstand="true">http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/root/cimv2/CIM_VirtualSystemManagementService/AddResourceSetting</a:Action>

 <w:MaxEnvelopeSize s:mustUnderstand="true">153600</w:MaxEnvelopeSize>

 <a:MessageID>uuid:20B4C090-20DD-4256-9814-B4CDEEAEDBBF</a:MessageID>

 <w:Locale xml:lang="en-US" s:mustUnderstand="false"/>

<w:SelectorSet>

 <w:Selector Name="Name">Xen Hypervisor</w:Selector>

 <w:Selector Name="SystemCreationClassName">CIM_ComputerSystem</w:Selector>

 <w:Selector Name="SystemName">redwshashiu-xen</w:Selector>

 <w:Selector Name="CreationClassName">Xen_VirtualSystemManagementService</w:Selector>

 </w:SelectorSet>

 <w:OperationTimeout>PT60.000S</w:OperationTimeout>

 </s:Header>

<s:Body>

<AddResourceSetting_INPUT>

<AffectedSystem>

 <Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</Address>

<ReferenceParameters>

 <ResourceURI>http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/Xen_ComputerSystem</ResourceURI>

<SelectorSet>

 <Selector Name="CreationClassName">Xen_ComputerSystem</Selector>

 <Selector Name="Name">XP001</Selector>

 <Selector Name="InstanceID">Xen:3932067a-9823-bae5-9ea1-2f22a0ec8aad</Selector>

 <Selector Name="__cimnamespace">root/cimv2</Selector>

 </SelectorSet>

 </ReferenceParameters>

 </AffectedSystem>

 <ResourceSettings>instance of Xen_Processor { ResourceType=3; VirtualQuantity=1; AllocationUnits=&quot;Cores&quot;; };</ResourceSettings>

 </AddResourceSetting_INPUT>

 </s:Body>

 </s:Envelope>

-------------------------- openwsman output (CIM-XML)------------------------------

<CIM CIMVERSION="2.0" DTDVERSION="2.0">
<MESSAGE ID="4711" PROTOCOLVERSION="1.0">
<SIMPLEREQ>
<METHODCALL NAME="AddResourceSetting"><LOCALINSTANCEPATH><LOCALNAMESPACEPATH>
<NAMESPACE NAME="root"></NAMESPACE>
<NAMESPACE NAME="cimv2"></NAMESPACE>
</LOCALNAMESPACEPATH>
<INSTANCENAME CLASSNAME="Xen_VirtualSystemManagementService">
<KEYBINDING NAME="SystemCreationClassName"><KEYVALUE VALUETYPE="string">CIM_ComputerSystem</KEYVALUE></KEYBINDING>
<KEYBINDING NAME="SystemName"><KEYVALUE VALUETYPE="string">redwshashiu-xen</KEYVALUE></KEYBINDING>
<KEYBINDING NAME="CreationClassName"><KEYVALUE VALUETYPE="string">Xen_VirtualSystemManagementService</KEYVALUE></KEYBINDING>
<KEYBINDING NAME="Name"><KEYVALUE VALUETYPE="string">Xen Hypervisor</KEYVALUE></KEYBINDING>
</INSTANCENAME>
</LOCALINSTANCEPATH>
<PARAMVALUE NAME="ResourceSettings" PARAMTYPE="string">
<VALUE>instance of Xen_Processor { ResourceType=3; VirtualQuantity=1;  AllocationUnits=&amp;quot;Cores&amp;quot;; };</VALUE>
</PARAMVALUE>
<PARAMVALUE NAME="AffectedSystem" PARAMTYPE="string">
<VALUE>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymoushttp://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/Xen_ComputerSystemXen_ComputerSystemXP001Xen:3932067a-9823-bae5-9ea1-2f22a0ec8aadroot/cimv2</VALUE>
</PARAMVALUE>
</METHODCALL>
</SIMPLEREQ>
</MESSAGE>
</CIM>

Updates

#1 submitted by Klaus Kaempf on Tue, 08/18/2009 - 15:30
Status:active» fixed

Fixed in svn rev r3094. Will be included in upcoming 2.2 release