|
|
To programmatically retrieve a resource using the Repository service web service API, perform the following tasks:
• Using the Microsoft .NET client assembly, create a RepositoryServiceService object by invoking its default constructor. Set its Credentials property using a System.Net.NetworkCredential object containing the user name and password.Specify the URI of the target folder for the resource. In this case, because the resource named testResource will be stored in the folder named testFolder, the folder’s URI is "/testFolder". When using a language compliant with the Microsoft .NET Framework (for example, C#), store the URI in a System.String object.To create a resource, invoke the default constructor for the Resource class. In this example, the following information is stored in the Resource object:
• A com.adobe.repository.infomodel.Id object, which is created by invoking the default constructor for the Id class and assigned to the Resource object’s id field.
• A com.adobe.repository.infomodel.Lid object, which is created by invoking the default constructor for the Lid class and assigned to the Resource object’s lid field.
• A string containing the file name of the resource, which is assigned to the Resource object’s name field. The name used in this example is "testResource".
• A string containing the description of the resource, which is assigned to the Resource object’s description field. The description used in this example is "test resource".To create content for the resource, invoke the default constructor for the ResourceContent class. Then add content to the ResourceContent object. In this example, this is accomplished by doing the following tasks:
•
• Add the content to the resource by assigning the ResourceContent object to the Resource object’s content field.Invoke the RepositoryServiceService object’s writeResource method and pass in the URI of the folder, as well as the Resource object. Pass null for the other two parameters.
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/repositoryWritingFiles.121.4.html