4.2 Logging On a User

In this example, a protocol client sends the following SOAP message to log on a user whose name is Anat Kerry:

 <?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>
     <Login xmlns="http://schemas.microsoft.com/sharepoint/soap/">
       <username>Anat Kerry</username>
       <password>password</password>
     </Login>
   </soap:Body>
 </soap:Envelope>

The protocol server uses forms authentication and authenticates Anat Kerry. Therefore, the protocol server responds with 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>
     <LoginResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
       <LoginResult>
         <CookieName>.ASPXAUTH</CookieName>
         <ErrorCode>NoError</ErrorCode>
         <TimeoutSeconds>180</TimeoutSeconds>
       </LoginResult>
     </LoginResponse>
   </soap:Body>
 </soap:Envelope>