4 Protocol Examples

In this example, a protocol client displays a list of Web controls that can be added to Web pages that are using a page layout. The protocol client is an application that allows users to edit page layouts. To display the list, the protocol client constructs the following WSDL message, which queries the protocol server for the list of available Web controls:

 <?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>
     <FetchPanelsInformationByUrl xmlns="http://schemas.microsoft.com/sharepoint/publishing/soap/">
       <pageLayoutUrl>http://www.example.com/_catalogs/masterpage/ArticleLeft.aspx</pageLayoutUrl>
       <cultureName>en-us</cultureName>
     </FetchPanelsInformationByUrl>
   </soap:Body>
 </soap:Envelope>

The protocol server generates information for the two toolbox panels that are associated with the URL specified in the pageLayoutUrl element and returns the following SOAP 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>
     <FetchPanelsInformationByUrlResponse xmlns="http://schemas.microsoft.com/sharepoint/publishing/soap/">
       <FetchPanelsInformationByUrlResult>
         <PanelInfo>
           <displayName>Page Controls</displayName>
           <controlListId>0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007
               948130EC3DB064584E219954237AF39</controlListId>
           <panelTypeIdentifier>0</panelTypeIdentifier>
         </PanelInfo>
         <PanelInfo>
           <displayName>Article Page Controls</displayName>
           <controlListId>0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007
           948130EC3DB064584E219954237AF3900242457EFB8B24247815D688C5
           26CD44D</controlListId>
           <panelTypeIdentifier>2</panelTypeIdentifier>
         </PanelInfo>
       </FetchPanelsInformationByUrlResult>
     </FetchPanelsInformationByUrlResponse>
   </soap:Body>
 </soap:Envelope>

The protocol client then retrieves the list of Web controls that are associated with the shared toolbox panel by sending the following SOAP 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>
     <FetchControlLists xmlns="http://schemas.microsoft.com/sharepoint/publishing/soap/">
       <controlListIds>
         <string>0x010100C568DB52D9D0A14D9B2FDCC96666E9F2007
           948130EC3DB064584E219954237AF39</string>
       </controlListIds>
       <cultureName>en-us</cultureName>
     </FetchControlLists>
   </soap:Body>
 </soap:Envelope>

The protocol server determines that fifteen Web controls are associated with the shared toolbox panel and generates the following SOAP response:

 <?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>
     <FetchControlListsResponse xmlns="http://schemas.microsoft.com/sharepoint/publishing/soap/">
       <FetchControlListsResult>
         <string>&lt;?xml version="1.0" encoding="utf-16"?&gt;&lt;ControlsList&gt;&lt;Assembly Name="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WebControls" TagPrefix="wss"&gt;&lt;Control Name="Content Type" Title="Content Type" Description="The Content Type field is a Computed Type field. Insert this control onto your page to include this field in your page layout." Template="&amp;lt;{0}:ComputedField FieldName=&amp;quot;ContentType&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/{0}:ComputedField&amp;gt;" /&gt;&lt;Control Name="Name" Title="Name" Description="The Name field is a File Type field. Insert this control onto your page to include this field in your page layout." Template="&amp;lt;{0}:FileField FieldName=&amp;quot;FileLeafRef&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/{0}:FileField&amp;gt;" /&gt;&lt;Control Name="Title" Title="Title" Description="The Title field is a Text Type field. Insert this control onto your page to include this field in your page layout." Template="&amp;lt;{0}:TextField FieldName=&amp;quot;Title&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/{0}:TextField&amp;gt;" /&gt;&lt;Control Name="Document Modified By" Title="Document Modified By" Description="The Document Modified By field is a Text Type field. Insert this control onto your page to include this field in your page layout." Template="&amp;lt;{0}:TextField FieldName=&amp;quot;Modified_x0020_By&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/{0}:TextField&amp;gt;" /&gt;&lt;Control Name="Document Created By" Title="Document Created By" Description="The Document Created By field is a Text Type field. Insert this control onto your page to include this field in your page layout." Template="&amp;lt;{0}:TextField FieldName=&amp;quot;Created_x0020_By&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/{0}:TextField&amp;gt;" /&gt;&lt;Control Name="Description" Title="Description" Description="The Description field is a Note Type field. Insert this control onto your page to include this field in your page layout." Template="&amp;lt;{0}:NoteField FieldName=&amp;quot;Comments&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/{0}:NoteField&amp;gt;" /&gt;&lt;/Assembly&gt;&lt;Assembly Name="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.Publishing.WebControls" TagPrefix="cmsc"&gt;&lt;Control Name="Scheduling Start Date" Title="Scheduling Start Date" Description="The Scheduling Start Date f
 ield is a PublishingScheduleStartDateFieldType Type field. Insert this control onto your page to include this field in your page layout." Template="&amp;lt;{0}:PublishingScheduleFieldControl FieldName=&amp;quot;PublishingStartDate&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/{0}:PublishingScheduleFieldControl&amp;gt;" /&gt;&lt;Control Name="Scheduling End Date" Title="Scheduling End Date" Description="The Scheduling End Date field is a PublishingScheduleEndDateFieldType Type field. Insert this control onto your page to include this field in your page layout." Template="&amp;lt;{0}:PublishingScheduleFieldControl FieldName=&amp;quot;PublishingExpirationDate&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/{0}:PublishingScheduleFieldControl&amp;gt;" /&gt;&lt;/Assembly&gt;&lt;Assembly Name="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.WebControls" TagPrefix="wss"&gt;&lt;Control Name="Contact" Title="Contact" Description="The Contact field is a User Type field. Insert this control onto your page to include this field in your page layout." Template="&amp;lt;{0}:UserField FieldName=&amp;quot;PublishingContact&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/{0}:UserField&amp;gt;" /&gt;&lt;Control Name="Contact E-Mail Address" Title="Contact E-Mail Address" Description="The Contact E-Mail Address field is a Text Type field. Insert this control onto your page to include this field in your page layout." Template="&amp;lt;{0}:TextField FieldName=&amp;quot;PublishingContactEmail&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/{0}:TextField&amp;gt;" /&gt;&lt;Control Name="Contact Name" Title="Contact Name" Description="The Contact Name field is a Text Type field. Insert this control onto your page to include this field in your page layout." Template="&amp;lt;{0}:TextField FieldName=&amp;quot;PublishingContactName&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/{0}:TextField&amp;gt;" /&gt;&lt;Control Name="Contact Picture" Title="Contact Picture" Description="The Contact Picture field is a URL Type field. Insert this control onto your page to include this field in your page layout." Template="&amp;lt;{0}:UrlField FieldName=&amp;quot;PublishingContactPicture&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/{0}:UrlField&amp;gt;" /&gt;&lt;Control Name="Page Layout" Title="Page Layout" Description="The Page Layout field is a URL Type field. Insert this control onto your page to include this field in your page layout." Template="&amp;lt;{0}:UrlField FieldName=&amp;quot;PublishingPageLayout&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/{0}:UrlField&amp;gt;" /&gt;&lt;/Assembly&gt;&lt;Assembly Name="Microsoft.SharePoint.Publishing, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.SharePoint.Publishing.WebControls" TagPrefix="cmsc"&gt;&lt;Control Name="Rollup Image" Title="Rollup Image" Description="The Rollup Image field is a Image Type field. Insert this control onto your page to include this field in your page layout." Template="&amp;lt;{0}:RichImageField FieldName=&amp;quot;PublishingRollupImage&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/{0}:RichImageField&amp;gt;" /&gt;&lt;/Assembly&gt;&lt;Assembly Name="Microsoft.Office.Server.UserProfiles, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.Office.Server.WebControls.FieldTypes" TagPrefix="CustomTag_0"&gt;&lt;Control Name="Target Audiences" Title="Target Audiences" Description="The Target Audiences field is a TargetTo Type field. Insert this control onto your page to include this field in your page layout." Template="&amp;lt;{0}:SPFieldTargetToControl FieldName=&amp;quot;Audience&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/{0}:SPFieldTargetToControl&amp;gt;" /&gt;&lt;/Assembly&gt;&lt;/ControlsList&gt;</string>
       </FetchControlListsResult>
     </FetchControlListsResponse>
   </soap:Body>
 </soap:Envelope>