// prepare information for invocation
final org.oasis.wsrp.v2.UserContext wsrpUserContext = getUserContext();
checkUserContext(wsrpUserContext);
SecurityContext securityContext = createSecurityContext(params, runtimeContext, wsrpUserContext);
final MediaType mediaType = createMediaType(markupRequest);
PortalContext portalContext = createPortalContext(params, markupRequest);
UserContext userContext = createUserContext(wsrpUserContext, markupRequest.getLocale(), desiredLocales);
String portletInstanceKey = runtimeContext.getPortletInstanceKey();
instanceContext = createInstanceContext(portletContext, getAccessMode(), portletInstanceKey);
WindowContext windowContext = createWindowContext(portletContext.getId(), runtimeContext);