Protocols/MSNP/MSNP13/Contact Membership

From NINA Wiki
Revision as of 12:52, 20 August 2009 by AD (talk | contribs) (Reverted edit of LetodOmlin, changed back to last version by Doggie)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
MSN Protocol Version 13


The SOAP handler's URL

All the operations on the membership lists have to use an unique URL :

http://contacts.msn.com/abservice/SharingService.asmx

The old lists

These lists were the AL (Allow list), BL (Block list), RL (Reverse list), and PL (Pending list). They had some List IDs : 2 (AL), 4 (BL), 8 (RL) and 16 (PL).

The member roles

The SOAP lists doesn't use exactly the same AL, BL ... as in the old MSNPs but use some member roles : Allow (formerly AL), Block (formerly BL) ...

Adding someone

SOAP action

To add someone, you have to set the HTTP SOAPAction header to :

http://www.msn.com/webservices/AddressBook/AddMember

SOAP request bodies

Adding a Passport member

<?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"
   xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
 <soap:Header>
  <ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook">
   <ApplicationId>CFE80F9D-180F-4399-82AB-413F33A1FA11</ApplicationId>
   <IsMigration>false</IsMigration>
   <PartnerScenario>   An AB partner scenario   </PartnerScenario>
  </ABApplicationHeader>
  <ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook">
   <ManagedGroupRequest>false</ManagedGroupRequest>
  </ABAuthHeader>
 </soap:Header>
 <soap:Body>
  <AddMember xmlns="http://www.msn.com/webservices/AddressBook">
   <serviceHandle>
    <Id>0</Id>
    <Type>Messenger</Type>
    <ForeignId></ForeignId>
   </serviceHandle>
   <memberships>
    <Membership>
     <MemberRole>   A member role   </MemberRole>
     <Members>
      <Member xsi:type="PassportMember" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <Type>Passport</Type>
       <State>Accepted</State>
       <PassportName>   The new members's Passport name   </PassportName>
      </Member>
     </Members>
    </Membership>
   </memberships>
  </AddMember>
 </soap:Body>
</soap:Envelope>

SOAP response body

<?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:Header>
  <ServiceHeader xmlns="http://www.msn.com/webservices/AddressBook">
   <Version>11.02.1331.0000</Version>
  </ServiceHeader>
 </soap:Header>
 <soap:Body>
  <AddMemberResponse xmlns="http://www.msn.com/webservices/AddressBook" />
 </soap:Body>
</soap:Envelope>

Removing someone

SOAP action

To remove (delete) someone, you have to set the HTTP SOAPAction header to :

http://www.msn.com/webservices/AddressBook/DeleteMember

SOAP request bodies

Removing a Passport member

<?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"
   xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
 <soap:Header>
  <ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook">
   <ApplicationId>CFE80F9D-180F-4399-82AB-413F33A1FA11</ApplicationId>
   <IsMigration>false</IsMigration>
   <PartnerScenario>   An AB partner scenario   </PartnerScenario>
  </ABApplicationHeader>
  <ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook">
   <ManagedGroupRequest>false</ManagedGroupRequest>
  </ABAuthHeader>
 </soap:Header>
 <soap:Body>
  <DeleteMember xmlns="http://www.msn.com/webservices/AddressBook">
   <serviceHandle>
    <Id>0</Id>
    <Type>Messenger</Type>
    <ForeignId></ForeignId>
   </serviceHandle>
   <memberships>
    <Membership>
     <MemberRole>   A member role   </MemberRole>
     <Members>
      <Member xsi:type="PassportMember" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <Type>Passport</Type>
       <State>Accepted</State>
       <PassportName>   The new members's Passport name   </PassportName>
      </Member>
     </Members>
    </Membership>
   </memberships>
  </DeleteMember>
 </soap:Body>
</soap:Envelope>

SOAP response body

<?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:Header>
  <ServiceHeader xmlns="http://www.msn.com/webservices/AddressBook">
   <Version>11.02.1331.0000</Version>
  </ServiceHeader>
 </soap:Header>
 <soap:Body>
  <DeleteMemberResponse xmlns="http://www.msn.com/webservices/AddressBook" />
 </soap:Body>
</soap:Envelope>

The partner scenario

There are several scenarios :

  • Initial : used when retrieving the lists
  • BlockUnblock : used when blocking/unblocking someone, see below
  • Timer : can be used almost everywhere ???

Other possible scenarios in example form

(To be continued)