public static String executeXml( RepositoryFile file, HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse, IPentahoSession userSession )
throws Exception {
try {
HttpSessionParameterProvider sessionParameters = new HttpSessionParameterProvider( userSession );
HttpRequestParameterProvider requestParameters = new HttpRequestParameterProvider( httpServletRequest );
Map parameterProviders = new HashMap();
parameterProviders.put( "request", requestParameters ); //$NON-NLS-1$
parameterProviders.put( "session", sessionParameters ); //$NON-NLS-1$
List messages = new ArrayList();
IParameterProvider requestParams = new HttpRequestParameterProvider( httpServletRequest );
httpServletResponse.setContentType( "text/xml" ); //$NON-NLS-1$
httpServletResponse.setCharacterEncoding( LocaleHelper.getSystemEncoding() );
boolean forcePrompt = "true".equalsIgnoreCase(
requestParams.getStringParameter( "prompt", "false" ) ); //$NON-NLS-1$//$NON-NLS-2$ //$NON-NLS-3$
OutputStream contentStream = new ByteArrayOutputStream();
SimpleOutputHandler outputHandler = new SimpleOutputHandler( contentStream, false );
IRuntimeContext runtime = null;
try {