final Holder<List<Extension>> extensions = new Holder<List<Extension>>();
consumer.getMarkupService().getResource(request.getRegistrationContext(), portletContextHolder, request.getRuntimeContext(),
request.getUserContext(), request.getResourceParams(), resourceContextHolder, sessionContextHolder, extensions);
ResourceResponse resourceResponse = WSRPTypeFactory.createResourceResponse(resourceContextHolder.value);
resourceResponse.setPortletContext(portletContextHolder.value);
resourceResponse.setSessionContext(sessionContextHolder.value);
if (ParameterValidation.existsAndIsNotEmpty(extensions.value) && !WSRPUtils.isSingletonListWithNullOrEmptyElement(extensions.value))
{
resourceResponse.getExtensions().addAll(extensions.value);
}
return resourceResponse;
}