} catch (Exception e) {
logger.warn(e.getMessage(), e);
throw new RemoteException("Invalid request ID.");
}
CancelSpotInstanceRequestsResponseType csirst = new CancelSpotInstanceRequestsResponseType();
if(spotRequests != null){
CancelSpotInstanceRequestsResponseSetItemType[] csirrst = new CancelSpotInstanceRequestsResponseSetItemType[spotRequests.length];
for (int i = 0; i < spotRequests.length; i++) {
SpotRequestInfo info = spotRequests[i];
CancelSpotInstanceRequestsResponseSetItemType item = new CancelSpotInstanceRequestsResponseSetItemType();
item.setSpotInstanceRequestId(info.getRequestID());
item.setState(info.getState().getStateStr());
csirrst[i] = item;
}
CancelSpotInstanceRequestsResponseSetType sirst = new CancelSpotInstanceRequestsResponseSetType();
sirst.setItem(csirrst);
csirst.setSpotInstanceRequestSet(sirst);
}
return csirst;
}