3.1.4.11 DownloadFiles

A DSS calls the DownloadFiles method to initiate the Content Download process on a USS for a set of files from the parent of the USS. This method is typically called by a DSS after a Content Download attempt from the USS fails with a "File Not Found" condition.

 <wsdl:operation name="DownloadFiles">
   <wsdl:input message="tns:DownloadFilesSoapIn" />
   <wsdl:output message="tns:DownloadFilesSoapOut" />
 </wsdl:operation>

The SOAP operation is defined as follows.

 <soap:operation soapAction="http://www.microsoft.com/SoftwareDistribut
 ion/DownloadFiles" style="document" />

Request validation:

The USS validates inputs as given in the following table. If any of the inputs are not valid, the USS MUST return a SOAP fault message to the DSS with the <ErrorCode> set, as shown in the following table.

Input

Validation conditions

ErrorCode

cookie

MUST be present and not empty.

InvalidCookie

cookie

The EncryptedData MUST be the correct format such that the USS can read values out of it, as specified in section 2.2.4.8.

InvalidCookie

protocolVersion in the cookie EncryptedData

MUST be of the format x.y where x is the Major Version and y is the Minor Version number.

InvalidParameters

protocolVersion in the cookie EncryptedData

Major Version MUST be 1.

IncompatibleProtocolVersion

fileDigestList

MUST be present, and the number of elements in the array MUST NOT be greater than 100.

InvalidParameters

Data processing:

The USS MUST process this message as follows:

  1. Locate the entry corresponding to each requested FileDigest in the Revision Table.

  2. For all FileDigest values not found in the table, report back a SOAP fault to the DSS with ErrorCode set to "FileDigestsMissing" and the <Message> XML element within the <soap:Fault><detail> element containing the list of missing FileDigest values, each separated by a "|" character.

  3. For each entry found in the Revision Table, initiate an HTTP download as follows:

    • If the Parent Server State's CatalogOnlySync flag is set to FALSE, construct the URL as given below and initiate the download.

    • If the Parent Server State's CatalogOnlySync flag is TRUE, initiate the download from using the MUUrl for the file.

  4. If the download fails, silently ignore the error.

  5. If the download succeeds, verify that the FileDigest field of the corresponding entry in the Content Store matches the SHA-1 hash value computed over the contents of the file. If the values do not match, delete the downloaded file. Otherwise, store the file in the Content Store.

Response:

If no errors occur during processing, the USS MUST return the success response to the DSS.

If an error occurs during processing, the USS MUST return a SOAP fault. The SOAP fault SHOULD contain an <ErrorCode> element, as described in section 2.2.9. If the SOAP fault contains an <ErrorCode> element, its value MUST be one of the following.

If the DSS receives a SOAP fault containing an <ErrorCode> element, it MUST react to the fault, as described in the following table. If the DSS receives a fault that does not contain an <ErrorCode> element, it MUST stop the protocol.

ErrorCode

Description

InvalidParameters

Parameters passed to a web method are not valid. The message part of the exception will contain the parameter name. The DSS MUST stop the protocol.

InternalServerError

An internal error occurred on the server. The DSS MUST stop the protocol.

InvalidCookie

The cookie has a syntax, formatting, or other error. The DSS MUST restart the protocol from the beginning.

IncompatibleProtocolVersion

The version of the protocol used by DSS is incompatible with the version used by USS. The DSS MUST stop the protocol.

FileDigestsMissing

Some or all of the requested FileDigest values are not known to the USS. This could be due to deletion of unneeded updates on the USS. The DSS MUST restart the protocol from the beginning.