guides:ws_payloads_retrieve_payload
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| guides:ws_payloads_retrieve_payload [2020/08/24 21:17] – brett.zamora | guides: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: | **Important: | ||
| 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: | ||
| + | | ||
| 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
