4 Protocol Examples

A protocol client might construct the following WSDL message to find the exact final destination location for file with three properties that is intended to be stored at "http://www.contoso.com/blue/Blue-Car.jpg" and of file type "Document".

 <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
     <GetFinalRoutingDestinationFolderUrl xmlns="http://schemas.microsoft.com/sharepoint/soap/recordsrepository/">
       <properties>
         <RecordsRepositoryProperty>
           <Name>Color</Name>
           <DisplayName>Color</DisplayName>
           <Value>blue</Value>
           <Type>Text</Type>
           <Other />
         </RecordsRepositoryProperty>
         <RecordsRepositoryProperty>
           <Name>Title</Name>
           <DisplayName>Title</DisplayName>
           <Value>blue file</Value>
           <Type>Text</Type>
           <Other />
         </RecordsRepositoryProperty>
         <RecordsRepositoryProperty>
           <Name>Name</Name>
           <DisplayName>Name</DisplayName>
           <Value>blue file</Value>
           <Type>Text</Type>
           <Other />
         </RecordsRepositoryProperty>
       </properties>
       <contentTypeName>Document</contentTypeName>
       <originalSaveLocation>http://www.contoso.com/green/Blue-Car.jpg</originalSaveLocation>
     </GetFinalRoutingDestinationFolderUrl>
   </soap:Body>
 </soap:Envelope>

The protocol server determines the appropriate storage location from the list of configured rules. The protocol server evaluates rules based on the properties of the document if applicable. Once a rule is determined the protocol server returns the data for that final location in the form of the following WSDL message:

 <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
     <GetFinalRoutingDestinationFolderUrlResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/recordsrepository/">
       <GetFinalRoutingDestinationFolderUrlResult>
         <Url>http://www.contoso.com/blue</Url>
         <ResultType>ParsingDisabledAtDestination</ResultType>
         <CollisionSetting>NoCollision</CollisionSetting>
       </GetFinalRoutingDestinationFolderUrlResult>
     </GetFinalRoutingDestinationFolderUrlResponse>
   </soap:Body>
</soap:Envelope>

If the protocol server determines the final location as "http://www.contoso.com/blue" as in previous example but finds that the file "Blue-Car.jpg" already exists at the location then the protocol server might respond with the following WSDL message:

 <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     <soap:Body>
       <GetFinalRoutingDestinationFolderUrlResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/recordsrepository/">
         <GetFinalRoutingDestinationFolderUrlResult>
           <Url>http://www.contoso.com/blue</Url>
           <ResultType>Success</ResultType>
           <CollisionSetting>AppendUniqueSuffixes</CollisionSetting>
         </GetFinalRoutingDestinationFolderUrlResult>
       </GetFinalRoutingDestinationFolderUrlResponse>
     </soap:Body>
</soap:Envelope>

On receiving this message the protocol client might decide to append a suffix, such as a unique identifier, before placing the file at the determined location. In this case protocol client might save the file as Blue_123456.jpg at "http://www.contoso.com/blue".

Next, the protocol client might construct the following WSDL message to submit a file named "small.txt" to the repository as a generic "Document" file type with various properties:

 <?xml version="1.0" encoding="utf-8"?>
 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body>
       <SubmitFile xmlns="http://schemas.microsoft.com/sharepoint/soap/recordsrepository/">
          <fileToSubmit>WlpaWlpaWlpaWg</fileToSubmit>
          <properties>
             <RecordsRepositoryProperty>
                <Name>ID</Name>
                <Value>7</Value>
                <Type>Counter</Type>
                <Other/>
             </RecordsRepositoryProperty>
             <RecordsRepositoryProperty>
                <Name>ContentTypeId</Name>
                <Value>0x01010093344DD323F47F48A62CD1F5C002446B</Value>
                <Type>ContentTypeId</Type>
                <Other/>
             </RecordsRepositoryProperty>  
             <RecordsRepositoryProperty>
                <Name>ContentType</Name>
                <Value>Document</Value>
                <Type>Text</Type>
                <Other/>
             </RecordsRepositoryProperty>
             <RecordsRepositoryProperty>
                <Name>Created</Name>
                <Value>1/16/2008 6:18:53 PM</Value>
                <Type>DateTime</Type>
                <Other/>
             </RecordsRepositoryProperty>
             <RecordsRepositoryProperty>
                <Name>vti_modifiedby</Name>
                <Value>CONTOSO\someone</Value>
                <Type>String</Type>
                <Other/>
             </RecordsRepositoryProperty>
          </properties>
          <recordRouting>Document</recordRouting>
          <sourceUrl>http://www.contoso.com/Shared Documents/small.txt</sourceUrl>
                <userName>CONTOSO\someone</userName>
       </SubmitFile>
    </soap:Body>
 </soap:Envelope>

The protocol server determines the location in the repository to store the file using the rule               for the "Document" file type and successfully stores the file there. The protocol server then responds with the following WSDL message:

 <?xml version="1.0" encoding="utf-8"?>
 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Body><SubmitFileResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/recordsrepository/">
          <SubmitFileResult>&lt;ResultCode&gt;Success&lt;/ResultCode&gt;&lt;AdditionalInformation&gt;http://www.contoso.com/sites/RC/MyDocuments/2008-01-17T08-50-50Z/small_T2CO2V.txt&lt;/AdditionalInformation&gt;</SubmitFileResult>
       </SubmitFileResponse>
    </soap:Body>
 </soap:Envelope>

A protocol client might construct the following WSDL message to retrieve information about all the legal holds in the repository.

  
 <?xml version="1.0" encoding="utf-8"?>
 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <soap:Body>
         <GetHoldsInfo xmlns="http://schemas.microsoft.com/sharepoint/soap/recordsrepository/" />
       </soap:Body>
     </soap:Envelope>

The protocol server returns the data for all legal holds in the repository in the form of the following WSDL message:

 <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <soap:Body>
         <GetHoldsInfoResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/recordsrepository/">
           <GetHoldsInfoResult>
             <HoldInfo>
               <Url>http://www.contoso.com/Lists/Holds/DispForm.aspx?ID=1</Url>
               <Title>Contoso vs. SomeCompany</Title>
               <Description>Court case of Contoso vs. SomeCompany</Description>
               <ManagedBy>Joe</ManagedBy>
               <RepositoryName>Records</RepositoryName>
               <Id>1</Id>
               <ListId>8f5f2a74-4fa6-4072-8227-328ff2b01efd</ListId>
               <WebId>9f0ccd71-0b29-4eb3-b5d1-fe4c58f37f21</WebId>
             </HoldInfo>
             <HoldInfo>
               <Url>http://www.contoso.com/Lists/Holds/DispForm.aspx?ID=2</Url>
               <Title>Contoso litigation</Title>
               <Description>Files on hold for the investigation of the "Contoso litigation"</Description>
               <ManagedBy>Joe</ManagedBy>
               <RepositoryName>Records</RepositoryName>
               <Id>2</Id>
               <ListId>8f5f2a74-4fa6-4072-8227-328ff2b01efd</ListId>
               <WebId>9f0ccd71-0b29-4eb3-b5d1-fe4c58f37f21</WebId>
             </HoldInfo>
           </GetHoldsInfoResult>
         </GetHoldsInfoResponse>
       </soap:Body>
     </soap:Envelope>

A protocol client might construct the following WSDL message to submit a file to a repository and place it on a legal hold.

 <?xml version="1.0" encoding="utf-8"?>
 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
     <SubmitFile xmlns="http://schemas.microsoft.com/sharepoint/soap/recordsrepository/">
       <fileToSubmit> WlpaWlpaWlpaWg </fileToSubmit>
       <properties>
         <RecordsRepositoryProperty>
           <Name>Color</Name>
           <DisplayName>Color</DisplayName>
           <Value>blue</Value>
           <Type>Text</Type>
           <Other />
         </RecordsRepositoryProperty>
         <RecordsRepositoryProperty>
           <Name>Title</Name>
           <DisplayName>Title</DisplayName>
           <Value>blue file</Value>
           <Type>Text</Type>
           <Other />
         </RecordsRepositoryProperty>
         <RecordsRepositoryProperty>
           <Name>Name</Name>
           <DisplayName>Name</DisplayName>
           <Value>blue file</Value>
           <Type>Text</Type>
           <Other />
         </RecordsRepositoryProperty>
         <RecordsRepositoryProperty>
           <Name>_dlc_hold_url</Name>
           <DisplayName />
           <Value>http://www.contoso.com/Lists/Holds/DispForm.aspx?ID=1</Value>
           <Type>OfficialFileCustomType</Type>
           <Other />
         </RecordsRepositoryProperty>
         <RecordsRepositoryProperty>
           <Name>_dlc_hold_searchqquery</Name>
           <DisplayName />
           <Value>contoso</Value>
           <Type>OfficialFileCustomType</Type>
           <Other />
         </RecordsRepositoryProperty>
         <RecordsRepositoryProperty>
           <Name>_dlc_hold_searchcontexturl</Name>
           <DisplayName />
           <Value>http://www.billing.contoso.com</Value>
           <Type>OfficialFileCustomType</Type>
           <Other />
         </RecordsRepositoryProperty>
         <RecordsRepositoryProperty>
           <Name>_dlc_hold_id</Name>
           <DisplayName />
           <Value>2</Value>
           <Type>OfficialFileCustomType</Type>
           <Other />
         </RecordsRepositoryProperty>
         <RecordsRepositoryProperty>
           <Name>_dlc_hold_comments</Name>
           <DisplayName />
           <Value>contoso case search query</Value>
           <Type>OfficialFileCustomType</Type>
           <Other />
         </RecordsRepositoryProperty>
       </properties>
       <recordRouting>Document</recordRouting>
       <sourceUrl>http://www.contoso.com/bills/blue-2006.doc</sourceUrl>
       <userName>redmond\pkmacct</userName>
     </SubmitFile>
   </soap:Body>
 </soap:Envelope>

The protocol server returns the result of the operation in the form of the following WSDL message:

 <?xml version="1.0" encoding="utf-8"?>
 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
     <SubmitFileResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/recordsrepository/">
       <SubmitFileResult>&lt;ResultCode&gt;Success&lt;/ResultCode&gt;&lt;ResultUrl&gt;http://co745-15/blue/blue-2006.doc&lt;/ResultUrl&gt;&lt;CustomProcessingResult&gt;&lt;HoldsProcessingResult&gt;Success&lt;/HoldsProcessingResult&gt;&lt;/CustomProcessingResult&gt;</SubmitFileResult>
     </SubmitFileResponse>
   </soap:Body>
 </soap:Envelope>