int retLen = 0;
char* retObjBytes = NULL;
retObjBytes = rmiClient->receiveBytes(retObjBytes, &retLen);
- retObj = IoTRMIUtil::getParamObject(retObj, retType.c_str(), retObjBytes);
+ retObj = IoTRMIUtil::getParamObject(retObj, retType.c_str(), retObjBytes, retLen);
}
return retObj;
if (paramCls[i].compare("string") == 0) {
// Get the length of the string through void* casting to string*
paramLen = (*(string*)paramObj[i]).length();
+ } else if (paramCls[i].compare("string[]") == 0) {
+ paramLen = IoTRMIUtil::getByteStringLength(*(vector<string>*) paramObj[i]);
+ } else {
+ string error = "IoTRMICall: Unrecognizable type: " + paramCls[i];
+ throw error;
}
// Some space for param length, i.e. 32 bits for integer
methodLen = methodLen + IoTRMIUtil::PARAM_LEN;
if (paramCls[i].compare("string") == 0) {
// Get the length of the string through void* casting to string*
paramLen = (*(string*)paramObj[i]).length();
+ } else if (paramCls[i].compare("string[]") == 0) {
+ paramLen = IoTRMIUtil::getByteStringLength(*(vector<string>*) paramObj[i]);
+ } else {
+ string error = "IoTRMICall: Unrecognizable type: " + paramCls[i];
+ throw error;
}
// Write the parameter length
char prmLenBytes[IoTRMIUtil::METHOD_ID_LEN];