4.3 Use GetApplicationInformation to retrieve information about a database application from the protocol server

This example describes how to use GetApplicationInformation, as described in section 3.1.4.4, to retrieve the information about a database application from the protocol server.

The protocol client sends the following message to the protocol server using an HTTP POST to http://www.example.com/exampleapplication/_vti_bin/accsvc/ApplicationDesignService.asmx to retrieve information about the database application. In this example, the protocol client has previously retrieved information about the database application, so the KnownObjects element in the message includes the list of objects that have previously been retrieved. For each of these objects, an ObjectIdentity element with an ID and Version attribute are included in the message. ID and Version are returned by the protocol server as part of the response to requests such as CreateAccessObject, GetAccessObject, or GetApplicationInformation.

 <?xml version="1.0" encoding="UTF-8"?>
 <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
   <soap12:Body>
     <GetApplicationInformation xmlns="http://schemas.microsoft.com/office/Access/2010/11/Server/WebServices/ApplicationDesignService">
       <parameters>
         <ProtocolVersionOptions>
           <ProtocolVersion>15.0.24.0</ProtocolVersion>
         </ProtocolVersionOptions>
         <KnownObjects>
           <ObjectIdentity ID="2" Version="2011-11-17T06:08:49.4330000" />
           <ObjectIdentity ID="1" Version="2011-11-17T06:08:11.2030000" />
           <ObjectIdentity ID="4" Version="2011-11-17T06:10:46.6058200" />
           <ObjectIdentity ID="3" Version="2011-11-17T06:10:45.5433200" />
         </KnownObjects>
       </parameters>
     </GetApplicationInformation>
   </soap12:Body>
 </soap12:Envelope>

The protocol server responds with the following message:

 <?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
     <GetApplicationInformationResponse xmlns="http://schemas.microsoft.com/office/Access/2010/11/Server/WebServices/ApplicationDesignService">
       <GetApplicationInformationResult ProtocolVersion="15.0.24.0" Name="exampleapplication" DatabaseName="ACCESS_EF43A3CE7B8F4250824F39A2E0DBF3C5" DataServerName="example.com" ApplicationCulture="en-US" RequestIPAddress="2001:4898:0:fff:0:5efe:172.18.168.80" IsDataMacroTracingOn="false" IsFirewallRestricted="true" IsDataConnectivitySupported="false">
         <Warning xsi:nil="true" />
         <Collation Culture="en-US" CaseSensitive="false" AccentSensitive="true" KanaSensitive="true" WidthSensitive="true" UseSupplementaryCharacters="true" />
         <NewObjects>
           <AccessObject xsi:type="Form" ID="5" Name="Contacts PreviewDatasheet" ObjectType="Form" Description="" Version="2011-11-17T06:10:47.6526950">
             <ParentId xsi:nil="true" />
             <Definition>
               <FormDef xmlns="http://schemas.microsoft.com/office/accessservices/2010/12/application">
                 <Html>
                   &lt;?xml version="1.0" encoding="UTF-8"?&gt;
                   
                   . . . . . content omitted from the example . . . . .
                   
                   &lt;/html&gt;
                 </Html>
               </FormDef>
             </Definition>
           </AccessObject>
           <AccessObject xsi:type="Form" ID="6" Name="_AppHomeForm" ObjectType="Form" Description="" Version="2011-11-17T06:11:54.6683200">
             <ParentId xsi:nil="true" />
             <Definition>
               <FormDef xmlns="http://schemas.microsoft.com/office/accessservices/2010/12/application">
                 <Html>
                   &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
                   . . . . . content omitted from the example . . . . .
  
                   &lt;/html&gt;
                 </Html>
               </FormDef>
             </Definition>
           </AccessObject>
         </NewObjects>
         <UpdatedObjects />
         <DeletedObjects />
       </GetApplicationInformationResult>
     </GetApplicationInformationResponse>
   </soap:Body>
 </soap:Envelope>

In this example, the protocol server responds with additional information about the application. There are two forms that the protocol client had not retrieved information about previously, so the NewObjects element contains an AccessObject element (as defined in section 2.2.4.1) for each of those Form objects. The Definition element of each AccessObject element contains the definition of the form (in the preceding example SOAP message, the declaration of each form has been omitted to aid the clarity of the example).