|
|
The following C# code example reads a resource called testResource from the repository.using System;using System.Collections;using System.ComponentModel;using System.Data;using System.IO;namespace RepositoryWebService{class ReadFile{[STAThread]static void Main(string[] args){// This example will retrieve a resource from the LiveCycle ES repositorytry{//Create a RepositoryServiceService objectRepositoryServiceService repositoryClient = new RepositoryServiceService();repositoryClient.Credentials = new System.Net.NetworkCredential("administrator", "password");// Specify the URI of the resource to be retrievedString resourceUri = "/testFolder/testResource";// Retrieve the resourceResource r = repositoryClient.readResource(resourceUri, null, null);// Print the resource verification messageConsole.WriteLine("Resource " +resourceUri +" was successfully retrieved.");}catch (Exception e){Console.WriteLine("Exception thrown while trying to read the file" +e.Message);}}}}
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/sdkHelp/quickStarts_Repository.18.9.html