public Object invokeMethod(String className,String namespace,Object instance,String methodName, List inParameterValues) throws SPLException {
logger.entering(sourceClass,Thread.currentThread().getName()+" "+ "invokeMethod");
Vector inParams=new Vector();
Vector outParams=new Vector();
CIMObjectPath cop=new CIMObjectPath(className,namespace);
if(className!=null && namespace!=null){
try
{
Iterator it=inParameterValues.iterator();
Map cimArgNameValuePairs= new HashMap();
while(it.hasNext())
{
Argument arg=(Argument)it.next();
cimArgNameValuePairs.put(arg.getName(), arg.getValue());
//System.out.println(" added to cimArgNameValuePairs : "+arg.getName()+ " "+arg.getValue().toString());
}
if(instance instanceof CIMObjectPath)
{
cop=(CIMObjectPath)instance;
CIMObjectPath classCop=new CIMObjectPath(className,namespace);
CIMClass cimclass=handle.getClass(classCop, true, true, true, null);
CIMMethod cimMethod= cimclass.getMethod(methodName);
Vector params = cimMethod.getParameters();
for(int j=0;j<params.size();j++)
{
CIMParameter cimparameter=(CIMParameter)params.get(j);
String parameterName=cimparameter.getName();
int type=cimparameter.getType().getType();
//boolean isArray=cimparameter.isArray();
//System.out.println("parameter name = "+parameterName);
Object paramValue=cimArgNameValuePairs.get(parameterName);
if(paramValue!=null){
CIMValue cv=getCIMObjectOfGivenType(type, paramValue);
//System.out.println("parameter value = "+paramValue+ " "+cv.toString());
//new CIMArgument(parameterName,cv);
inParams.add(new CIMArgument(parameterName,cv));
}
else
{
//System.out.println("value = null");
}
}
if(logger.isLoggable(Level.FINE))
logger.fine(Thread.currentThread().getName()+" Actuator::invokeMethod:invoking method "+methodName);
CIMObjectPath instanceCop=new CIMObjectPath(className,namespace);
instanceCop.setKeys(cop.getKeys());
//System.out.println("cop, methodName :"+instanceCop+" "+ methodName);
CIMValue cv=handle.invokeMethod(instanceCop, methodName, inParams, outParams);
//System.out.println("invokeMethod complete : return value="+cv.getValue());
if(logger.isLoggable(Level.FINE))