MSNP13:Contact Membership

From MSNPiki

Jump to: navigation, search
MSN Protocol Version 13

Overview · Changes · Challenges · Sharing Folders · Example Session
SOAP Address Book: Retrieving the lists · Updating the membership lists · Updating the AB
Other features using SOAP: Offline Messaging · Passport 3.0 authentication


Contents

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 :

Other possible scenarios in example form

(To be continued)

Personal tools
Namespaces
Variants
Actions
Windows Live Network Protocol
Windows Live Client Protocol
Reference
Toolbox