FYI I usually use the update method rather than creating a structure myself:

resp.updateScopeScanStatus().setRetCode(retCode);
resp.updateScopeScanStatus().setRetMsg(retMsg);
resp.updateScopeScanStatus().setIsEnabled(isEnabled);

only arrays of structs should need you to create the entries.