Site Tools


guides:ws_payloads_retrieve_payload

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
guides:ws_payloads_retrieve_payload [2020/08/24 21:17] brett.zamoraguides:ws_payloads_retrieve_payload [2020/08/24 21:24] (current) brett.zamora
Line 2: Line 2:
  
 The payloads web service is a REST structured service that derives its functionality based on syntax used when calling the web service. To retrieve a payload from a repository, call the payloads web service with a repository name and the payload file name. The payloads web service is a REST structured service that derives its functionality based on syntax used when calling the web service. To retrieve a payload from a repository, call the payloads web service with a repository name and the payload file name.
 +
 +The payload will be returned in the body of the response as a UTF-8 encoded XML string.
  
 **Important:** The payload must be locked prior to retrieving it. **Important:** The payload must be locked prior to retrieving it.
Line 135: Line 137:
     string strLocalFolder = tbLocalFolderName.Text;     string strLocalFolder = tbLocalFolderName.Text;
     string strRepository = (cbRepository.SelectedItem as ComboBoxItem).Content as string;     string strRepository = (cbRepository.SelectedItem as ComboBoxItem).Content as string;
 +    
 +    // See payloads:get_repository_file_names web servicefor the following
 +    
     string[] strFolderFileNames = getRepositoryFileNames(strRepository);     string[] strFolderFileNames = getRepositoryFileNames(strRepository);
  
Line 314: Line 319:
         if (response.IsSuccessful)         if (response.IsSuccessful)
         {         {
 +            // Note: Do not try to use the LoadXml API as it does not account for the encoding preamble.
 +            
             XmlReader myXmlReader = XmlReader.Create(new MemoryStream(Encoding.UTF8.GetBytes(response.Content)));             XmlReader myXmlReader = XmlReader.Create(new MemoryStream(Encoding.UTF8.GetBytes(response.Content)));
             XmlDocument xmlDoc = new XmlDocument();             XmlDocument xmlDoc = new XmlDocument();
guides/ws_payloads_retrieve_payload.1598303831.txt.gz · Last modified: by brett.zamora