ArgumentChecker.notNull(requestEnvelope, "FudgeMessageEnvelope");
FudgeMsg requestFudgeMsg = requestEnvelope.getMessage();
if (requestFudgeMsg == null) {
throw new OpenGammaRuntimeException("Request fudgeMsg cannot be null");
}
ReferenceDataRequestMessage refDataRequest = ReferenceDataRequestMessage.fromFudgeMsg(deserializer, requestFudgeMsg);
if (refDataRequest == null) {
throw new OpenGammaRuntimeException("reference data request message from fudgeMsg cannot be null");
}
Set<String> securities = refDataRequest.getSecurities();
Set<String> fields = refDataRequest.getFields();
ReferenceDataProviderGetRequest underlyingRequest = ReferenceDataProviderGetRequest.createGet(securities, fields, true);
ReferenceDataProviderGetResult underlyingResult = _underlying.getReferenceData(underlyingRequest);
ReferenceDataResult refDataResult = new ReferenceDataResult();
for (ReferenceData refData : underlyingResult.getReferenceData()) {
refDataResult.addResult(new PerSecurityReferenceDataResult(refData));