4 Protocol Examples

SharePoint

The overall scenario is that a protocol client requires the list of alert subscriptions for the current authenticated user. The client submits a GetAlerts request similar to the following code example.

 <?xml version="1.0"?>
 <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope">
  <Body>
   <GetAlerts
     xmlns="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts">
   </GetAlerts>
  </Body>
 </Envelope>

The protocol server receives this request and creates an appropriate response, similar to the following code example.

 <?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>
     <GetAlertsResponse
     xmlns="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts">
       <GetAlertsResult>
         <CurrentUser>Auricchio, Jose Luis</CurrentUser>
         <AlertServerName>widgets</AlertServerName>
         <AlertServerUrl>http://widgets</AlertServerUrl>
         <AlertServerType>STS</AlertServerType>
         <AlertsManagementUrl>
           http://widgets/_layouts/MySubs.aspx
         </AlertsManagementUrl>
         <AlertWebTitle>widgets</AlertWebTitle>
         <NewAlertUrl>http://widgets/_layouts/SubChoos.aspx</NewAlertUrl>
         <AlertWebId>4a3d9478-00a0-4ea8-bdb6-36034a189433</AlertWebId>
         <Alerts>
           <Alert>
             <Id>{76061063-9C09-4C4D-B1A1-16D3F0CDF1F8}</Id>
             <Title>Shared Documents</Title>
             <Active>true</Active>
             <EventType>All</EventType>
             <AlertForUrl>http://widgets/Shared Documents</AlertForUrl>
             <EditAlertUrl>http://widgets/_layouts/SubEdit.aspx?Alert={76061063-9C09-4C4D-B1A1-16D3F0CDF1F8}&amp;List={071C725D-EF5E-4779-B95C-0F8173C260E1}</EditAlertUrl>
             <DeliveryChannels>
               <DeliveryChannel xsi:type="EmailChannel">
                 <Frequency>Immediate</Frequency>
                 <Address>jose@cohowinery.com</Address>
               </DeliveryChannel>
             </DeliveryChannels>
           </Alert>
         </Alerts>
       </GetAlertsResult>
     </GetAlertsResponse>
   </soap:Body>
 </soap:Envelope>

If the user directs the protocol client to delete an existing alert subscription, the request would resemble the following code example.

 <?xml version="1.0"?>
 <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope">
  <Body>
   <DeleteAlerts
   xmlns="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts">
    <IDs>
     <string>{76061063-9C09-4C4D-B1A1-16D3F0CDF1F8}</string>
    </IDs>
   </DeleteAlerts>
  </Body>
 </Envelope>

The protocol server response would typically resemble the following code example.

 <?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>
     <DeleteAlertsResponse
     xmlns="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts">
       <DeleteAlertsResult />
     </DeleteAlertsResponse>
   </soap:Body>
 </soap:Envelope>
Show: