Protocols/MSNP/MSNP13/Contact Membership

From NINA Wiki
Jump to navigation Jump to search
MSNP Protocol
Version 13
General
OverviewChanges
ChallengesSharing 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
Overview
IntroductionTermsClients
Reference
Error ListCommandsRelying Party SuiteSpotlife
Services
XMPPHTTP GatewayTabsActivities
Documentation
Development ToolsMSNP Grid
PolygamyURLs used by MSN
Documents
Protocol Versions
Version 21
Version 18
Version 16
Version 15
Version 14
Version 13
Version 12
Version 11
Version 9
Version 8
Version 2
MSNC
IntroductionP2PObject DescriptorDisplay PicturesFile Transfer
Scenarios
Microsoft Messenger for Mac
MSNP on WebTV (MSNTV)


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)