Passing Instance to method Provider
Imran <imran <at> spsoftindia.com>
2003-12-02 17:47:59 GMT
Dear OpenPegasus
Developers,
I am writting a Method Provider. The
MOF is
class cls1
{
[key]string str;
};
class cls2
{
string PrintInst( [IN] cls1 ref
c1Ref);
};
I wanted to pass the Instance of
class cls1 as an IN parameter to method Provider.For that, I am creating the
instance of class cls1 by setting properties and qualifiers at the client
side(In my test client program). And i send the object path as IN param to
Method Provider.Can i send Instance directly as an IN param?
After getting the Object path at
provider side i am able to read the path.
Now I want to create an instance
using the objectpath, is it possible ?
If not how can I read the properties
of the reference object which I am getting as IN parameter.
I am writing the following code to
achieve this functionality but I was not able to read the property
The code in InvokeMethod for provider
will be as follows
CIMObjectPath path;
String reply =
String::EMPTY;
Disvalue paramVal =
inParameters[0].getValue();
paramVal.get(path);
CIMInstance
instcls1("cls1");
instcls1.setPath(path);
//sets the object path for the instance.
CIMProperty propertycls1 =
instcls1.getProperty(0);
CIMValue propertyValuecls1 =
propertycls1.getValue();
propertyValuecls1.get(replyName);
How can i read the properties of this
particular instance?
Thanks and Regards
Imran