Citrix MetaFrame XP 1.0 for Windows with Feature Release 2


Obtain the List of Applications

Пример JSP

Obtain the List of Applications ClearTextCredentials credentials = new ClearTextCredentials(); credentials.initialize("user", "domain", "password"); CitrixWireGateway gateway = new CitrixWireGateway(); gateway.initialize(credentials); AppDataList appList = gateway.getAppDataList(); Locate the Published Application Using File Type Association App contentApp = appList.findAppByExtension("http://mywebsite/spec.doc"); Launch the Application with the Content // Create a TemplateParser object (to generate the ICA file) TemplateParser parser = new TemplateParser(); // Set up the launching credentials String CookStr = "NFuse_User=user&NFuse_Domain=domain&NFuse_LogonMode=Explicit&NFuse_Password=password"; // Set these as cookie session fields parser.setCookieSessionFields(CookStr); // Set the published application to use for launching the content urlSessionFields = "NFuse_Application=" + contentApp.getNameUrlEncoded + "&NFuse_AppFriendlyNameURLEncoded=" + contentApp.getFriendlyNameUrlEncoded; // Set these as URL session fields parser.setUrlSessionFields(UrlSessionFields); // Set the address of the content to use as a command line argument parser.setSingleSessionField("NFuse_AppCommandLine", "http://mywebsite/spec.doc"); // Specify the template ICA file to use parser.setSingleSessionField("NFuse_Template", "template.ica"); // Generate the content of the ICA file and return as MIME type "x-ica" // This will cause the browser to launch the ICA file and hence the // published application. if (parser.Parse()) { String contentType = parser.getContentType(); response.setContentType(contentType); boolean continue = True; while (continue) { String HtmlString = parser.getNextDataBlock(); If (HtmlString.length() == 0) { continue = False; } else { out.println(HtmlString); } } } else { // Parser failed. Attempt to display the published content using // local (client side) application. response.sendRedirect(docURL); }

Пример файла Template.ica

[Encoding] InputEncoding=ISO8859_1 [WFClient] Version=2 ClientName=[NFuse_ClientName] RemoveICAFile=yes [ApplicationServers] [NFuse_AppName]= [[NFuse_AppName]] Address=[NFuse_AppServerAddress] InitialProgram=#[NFuse_AppName] LongCommandLine="[NFuse_AppCommandLine]" DesiredColor=[NFuse_WindowColors] TransportDriver=TCP/IP WinStationDriver=ICA 3.0 [NFuse_ClientLogon] [NFuse_SOCKSSettings] AutologonAllowed=ON [NFuse_Ticket] [NFuse_IcaAudio] [NFuse_IcaWindow] [NFuse_IcaEncryption] SessionsharingKey=[NFuse_SessionSharingKey]

В начало

Содержание  Назад  Вперед