/*
* I assert that .getArgument(i) will return to me an Argument with only the name of the
* Argument and not it's value. I'll set the associated value by myself and
* Also I assert that the Argument are ordered
*/
Argument argument=argsList.getArgument(i);
String argumentName=argument.getName();
//String relateVar=argument.getRelatedStateVariableName();
UPnPStateVariable stateVar=this.getStateVariable(argumentName);
String upnpType=stateVar.getUPnPDataType();
/*Class javaClass=stateVar.getJavaDataType();*/
//setting the value related to the input argument
argument.setValue(Converter.toString(args.get(argumentName),upnpType));
}
act.setInArgumentValues(argsList);
if(act.postControlAction()==true){
//TODO check what happen if I don't have any output argument
Properties outDic=new Properties();
ArgumentList outArgs=act.getOutputArgumentList();
if(outArgs.size()==0){
return null;
}
for(int i=0;i<outArgs.size();i++){
Argument argument=outArgs.getArgument(i);
String argumentName=outArgs.getArgument(i).getName();
//String relateVar=argument.getRelatedStateVariableName();
UPnPStateVariable stateVar=getStateVariable(argumentName);
//String javaType=stateVar.getJavaDataType().getName();
//TODO rember to catch number exception
String upnpType=stateVar.getUPnPDataType();
outDic.put(argumentName,Converter.parseString(argument.getValue(),upnpType));
}
return outDic;
}else{
UPnPStatus controlStatus = act.getControlStatus();
throw new UPnPException(controlStatus.getCode(),controlStatus.getDescription());