~ubuntu-branches/ubuntu/hardy/emesene/hardy-proposed

« back to all changes in this revision

Viewing changes to emesenelib/XmlTemplates.py

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2008-02-06 21:57:05 UTC
  • Revision ID: james.westby@ubuntu.com-20080206215705-d1abf07rdwcaju3p
Tags: upstream-1.0~r1013
ImportĀ upstreamĀ versionĀ 1.0~r1013

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
 
 
3
#   This file is part of emesene.
 
4
#
 
5
#    Emesene is free software; you can redistribute it and/or modify
 
6
#    it under the terms of the GNU General Public License as published by
 
7
#    the Free Software Foundation; either version 2 of the License, or
 
8
#    (at your option) any later version.
 
9
#
 
10
#    emesene is distributed in the hope that it will be useful,
 
11
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
13
#    GNU General Public License for more details.
 
14
#
 
15
#    You should have received a copy of the GNU General Public License
 
16
#    along with emesene; if not, write to the Free Software
 
17
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
18
 
 
19
 
 
20
# userName, passport, ticket
 
21
passport = '''<?xml version="1.0" encoding="UTF-8"?>
 
22
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsse="http://schemas.xmlsoap.org/ws/2003/06/secext" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing" xmlns:wssc="http://schemas.xmlsoap.org/ws/2004/04/sc" xmlns:wst="http://schemas.xmlsoap.org/ws/2004/04/trust">
 
23
  <Header>
 
24
    <ps:AuthInfo xmlns:ps="http://schemas.microsoft.com/Passport/SoapServices/PPCRL" Id="PPAuthInfo">
 
25
      <ps:HostingApp>{7108E71A-9926-4FCB-BCC9-9A9D3F32E423}</ps:HostingApp>
 
26
      <ps:BinaryVersion>4</ps:BinaryVersion>
 
27
      <ps:UIVersion>1</ps:UIVersion>
 
28
      <ps:Cookies></ps:Cookies>
 
29
      <ps:RequestParams>AQAAAAIAAABsYwQAAAAzMDg0</ps:RequestParams>
 
30
    </ps:AuthInfo>
 
31
    <wsse:Security>
 
32
       <wsse:UsernameToken Id="user">
 
33
         <wsse:Username>%s</wsse:Username> 
 
34
         <wsse:Password>%s</wsse:Password>
 
35
       </wsse:UsernameToken>
 
36
    </wsse:Security>
 
37
  </Header>
 
38
  <Body>
 
39
    <ps:RequestMultipleSecurityTokens xmlns:ps="http://schemas.microsoft.com/Passport/SoapServices/PPCRL" Id="RSTS">
 
40
      <wst:RequestSecurityToken Id="RST0">
 
41
        <wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>
 
42
        <wsp:AppliesTo>
 
43
          <wsa:EndpointReference>                
 
44
            <wsa:Address>http://Passport.NET/tb</wsa:Address>
 
45
          </wsa:EndpointReference>
 
46
        </wsp:AppliesTo>
 
47
      </wst:RequestSecurityToken>
 
48
      <wst:RequestSecurityToken Id="RST1">
 
49
       <wst:RequestType>http://schemas.xmlsoap.org/ws/2004/04/security/trust/Issue</wst:RequestType>
 
50
        <wsp:AppliesTo>
 
51
          <wsa:EndpointReference>
 
52
            <wsa:Address>messenger.msn.com</wsa:Address>
 
53
          </wsa:EndpointReference>
 
54
        </wsp:AppliesTo>
 
55
        <wsse:PolicyReference URI="?%s"></wsse:PolicyReference>
 
56
      </wst:RequestSecurityToken>
 
57
    </ps:RequestMultipleSecurityTokens>
 
58
  </Body>
 
59
</Envelope>\r\n'''
 
60
 
 
61
membershipList = '''<?xml version='1.0' encoding='utf-8'?>
 
62
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
 
63
   <soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
 
64
       <ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook">
 
65
           <ApplicationId xmlns="http://www.msn.com/webservices/AddressBook">09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>
 
66
           <IsMigration xmlns="http://www.msn.com/webservices/AddressBook">false</IsMigration>
 
67
           <PartnerScenario xmlns="http://www.msn.com/webservices/AddressBook">Initial</PartnerScenario>
 
68
       </ABApplicationHeader>
 
69
       <ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook">
 
70
           <ManagedGroupRequest xmlns="http://www.msn.com/webservices/AddressBook">false</ManagedGroupRequest>
 
71
       </ABAuthHeader>
 
72
   </soap:Header>
 
73
   <soap:Body xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
 
74
       <FindMembership xmlns="http://www.msn.com/webservices/AddressBook">
 
75
           <serviceFilter xmlns="http://www.msn.com/webservices/AddressBook">
 
76
               <Types xmlns="http://www.msn.com/webservices/AddressBook">
 
77
                   <ServiceType xmlns="http://www.msn.com/webservices/AddressBook">Messenger</ServiceType>
 
78
                   <ServiceType xmlns="http://www.msn.com/webservices/AddressBook">Invitation</ServiceType>
 
79
                   <ServiceType xmlns="http://www.msn.com/webservices/AddressBook">SocialNetwork</ServiceType>
 
80
                   <ServiceType xmlns="http://www.msn.com/webservices/AddressBook">Space</ServiceType>
 
81
                   <ServiceType xmlns="http://www.msn.com/webservices/AddressBook">Profile</ServiceType>
 
82
               </Types>
 
83
           </serviceFilter>
 
84
           <View xmlns="http://www.msn.com/webservices/AddressBook">Full</View>
 
85
        </FindMembership>
 
86
   </soap:Body>
 
87
</soap:Envelope>\r\n'''
 
88
 
 
89
addressBook = '''<?xml version="1.0" encoding="utf-8"?>
 
90
<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/">
 
91
    <soap:Header>
 
92
        <ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook">
 
93
            <ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>
 
94
            <IsMigration>false</IsMigration>
 
95
            <PartnerScenario>Initial</PartnerScenario>
 
96
        </ABApplicationHeader>
 
97
        <ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook">
 
98
            <ManagedGroupRequest>false</ManagedGroupRequest>
 
99
        </ABAuthHeader>
 
100
    </soap:Header>
 
101
    <soap:Body>
 
102
        <ABFindAll xmlns="http://www.msn.com/webservices/AddressBook">
 
103
            <abId>00000000-0000-0000-0000-000000000000</abId>
 
104
            <abView>Full</abView>
 
105
            <lastChange>0001-01-01T00:00:00.0000000-08:00</lastChange>
 
106
        </ABFindAll>
 
107
    </soap:Body>
 
108
</soap:Envelope>\r\n'''
 
109
 
 
110
dynamicItems = '''<?xml version="1.0" encoding="utf-8"?>
 
111
<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/">
 
112
    <soap:Header>
 
113
        <ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook">
 
114
            <ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>
 
115
            <IsMigration>false</IsMigration>
 
116
            <PartnerScenario>Initial</PartnerScenario>
 
117
        </ABApplicationHeader>
 
118
        <ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook">
 
119
            <ManagedGroupRequest>false</ManagedGroupRequest>
 
120
        </ABAuthHeader>
 
121
    </soap:Header>
 
122
    <soap:Body>
 
123
        <ABFindAll xmlns="http://www.msn.com/webservices/AddressBook">
 
124
            <abId>00000000-0000-0000-0000-000000000000</abId>
 
125
            <abView>Full</abView>
 
126
            <lastChange>0001-01-01T00:00:00.0000000-08:00</lastChange>
 
127
            <dynamicItemView>Gleam</dynamicItemView>
 
128
            <dynamicItemLastChange>0001-01-01T00:00:00.0000000-08:00</dynamicItemLastChange>
 
129
        </ABFindAll>
 
130
    </soap:Body>
 
131
</soap:Envelope>\r\n'''
 
132
 
 
133
# the first parameter Should be replaced with the group  ID
 
134
# the secont parameter should specify the member by contactId
 
135
# POST /abservice/abservice.asmx HTTP/1.1
 
136
# SOAPAction: http://www.msn.com/webservices/AddressBook/ABGroupContactAdd
 
137
# Host: omega.contacts.msn.com
 
138
 
 
139
oldaddUserToGroup =  '''<?xml version="1.0" encoding="utf-8"?>
 
140
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
 
141
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
142
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 
143
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">'
 
144
<soap:Header>
 
145
  <ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook">
 
146
    <ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>
 
147
    <IsMigration>false</IsMigration>
 
148
    <PartnerScenario>Timer</PartnerScenario>
 
149
  </ABApplicationHeader>
 
150
  <ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook">
 
151
    <ManagedGroupRequest>false</ManagedGroupRequest>
 
152
  </ABAuthHeader>
 
153
</soap:Header>
 
154
<soap:Body>
 
155
  <ABGroupContactAdd xmlns="http://www.msn.com/webservices/AddressBook">
 
156
    <abId>00000000-0000-0000-0000-000000000000</abId>
 
157
    <groupFilter>
 
158
      <groupIds>
 
159
        <guid>%s</guid>
 
160
      </groupIds>
 
161
    </groupFilter>
 
162
    <contacts>
 
163
      <Contact>
 
164
        <contactId>%s</contactId>
 
165
      </Contact>
 
166
    </contacts>
 
167
  </ABGroupContactAdd>
 
168
</soap:Body>
 
169
</soap:Envelope>\r\n'''
 
170
 
 
171
moveUserToGroup = '''<?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>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABGroupContactAdd xmlns="http://www.msn.com/webservices/AddressBook"><abId>00000000-0000-0000-0000-000000000000</abId><groupFilter><groupIds><guid>%s</guid></groupIds></groupFilter><contacts><Contact><contactId>%s</contactId></Contact></contacts></ABGroupContactAdd></soap:Body></soap:Envelope>'''
 
172
 
 
173
# contactID and guid
 
174
deleteUserFromGroup = '''<?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>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABGroupContactDelete xmlns="http://www.msn.com/webservices/AddressBook"><abId>00000000-0000-0000-0000-000000000000</abId><contacts><Contact><contactId>%s</contactId></Contact></contacts><groupFilter><groupIds><guid>%s</guid></groupIds></groupFilter></ABGroupContactDelete></soap:Body></soap:Envelope>'''
 
175
 
 
176
addUserToGroup = '''<?xml version="1.0" ?>
 
177
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 
178
    <soap:Header>
 
179
        <ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook">
 
180
            <ApplicationId>
 
181
                09607671-1C32-421F-A6A6-CBFAA51AB5F4
 
182
            </ApplicationId>
 
183
            <IsMigration>
 
184
                false
 
185
            </IsMigration>
 
186
            <PartnerScenario>
 
187
                BlockUnblock
 
188
            </PartnerScenario>
 
189
        </ABApplicationHeader>
 
190
        <ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook">
 
191
            <ManagedGroupRequest>
 
192
                false
 
193
            </ManagedGroupRequest>
 
194
        </ABAuthHeader>
 
195
    </soap:Header>
 
196
    <soap:Body>
 
197
        <ABGroupContactAdd xmlns="http://www.msn.com/webservices/AddressBook">
 
198
            <abId>
 
199
                00000000-0000-0000-0000-000000000000
 
200
            </abId>
 
201
            <groupFilter>
 
202
                <groupIds>
 
203
                    <guid>%s</guid>
 
204
                </groupIds>
 
205
            </groupFilter>
 
206
            <contacts>
 
207
                <Contact xmlns="http://www.msn.com/webservices/AddressBook">
 
208
                    <contactInfo>
 
209
                        <passportName>%s</passportName>
 
210
                        <isSmtp>false</isSmtp>
 
211
                        <isMessengerUser>true</isMessengerUser>
 
212
                    </contactInfo>
 
213
                </Contact>
 
214
            </contacts>
 
215
            <groupContactAddOptions>
 
216
                <fGenerateMissingQuickName>
 
217
                    true
 
218
                </fGenerateMissingQuickName>
 
219
            </groupContactAddOptions>
 
220
        </ABGroupContactAdd>
 
221
    </soap:Body>
 
222
</soap:Envelope>'''
 
223
 
 
224
changeNick='''<?xml version="1.0" encoding="utf-8"?>
 
225
<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/">
 
226
 
 
227
   <soap:Header>
 
228
       <ABApplicationHeader xmlns="http://www.msn.com/webservices/AddressBook">
 
229
           <ApplicationId>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId>
 
230
           <IsMigration>false</IsMigration>
 
231
           <PartnerScenario>Timer</PartnerScenario>
 
232
       </ABApplicationHeader>
 
233
       <ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook">
 
234
           <ManagedGroupRequest>false</ManagedGroupRequest>
 
235
       </ABAuthHeader>
 
236
   </soap:Header>
 
237
 
 
238
   <soap:Body>
 
239
       <ABContactUpdate xmlns="http://www.msn.com/webservices/AddressBook">
 
240
           <abId>00000000-0000-0000-0000-000000000000</abId>
 
241
           <contacts>
 
242
               <Contact xmlns="http://www.msn.com/webservices/AddressBook">
 
243
                   <contactInfo>
 
244
                       <contactType>%s</contactType>
 
245
                       <displayName>%s</displayName>
 
246
                   </contactInfo>
 
247
                   <propertiesChanged>DisplayName</propertiesChanged>
 
248
               </Contact>
 
249
           </contacts>
 
250
       </ABContactUpdate>
 
251
   </soap:Body>
 
252
</soap:Envelope>\r\n'''
 
253
 
 
254
# contactID nick
 
255
renameContact = '<?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>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABContactUpdate xmlns="http://www.msn.com/webservices/AddressBook"><abId>00000000-0000-0000-0000-000000000000</abId><contacts><Contact xmlns="http://www.msn.com/webservices/AddressBook"><contactId>%s</contactId><contactInfo><annotations><Annotation><Name>AB.NickName</Name><Value>%s</Value></Annotation></annotations></contactInfo><propertiesChanged>Annotation </propertiesChanged></Contact></contacts></ABContactUpdate></soap:Body></soap:Envelope>'
 
256
 
 
257
# the first %s is Allow or Block, the second is the passport mail
 
258
# POST /abservice/SharingService.asmx HTTP/1.1
 
259
# SOAPAction: http://www.msn.com/webservices/AddressBook/AddMember
 
260
# Host: omega.contacts.msn.com
 
261
addMember='''<?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>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>%s</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>%s</MemberRole><Members><Member xsi:type="PassportMember" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Type>Passport</Type><State>Accepted</State><PassportName>%s</PassportName></Member></Members></Membership></memberships></AddMember></soap:Body></soap:Envelope>'''
 
262
 
 
263
contactAdd = '''<?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>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>ContactSave</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABContactAdd xmlns="http://www.msn.com/webservices/AddressBook"><abId>00000000-0000-0000-0000-000000000000</abId><contacts><Contact xmlns="http://www.msn.com/webservices/AddressBook"><contactInfo><passportName>%s</passportName><isMessengerUser>true</isMessengerUser></contactInfo></Contact></contacts><options><EnableAllowListManagement>true</EnableAllowListManagement></options></ABContactAdd></soap:Body></soap:Envelope>'''
 
264
contactRemove = '''<?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>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABContactDelete xmlns="http://www.msn.com/webservices/AddressBook"><abId>00000000-0000-0000-0000-000000000000</abId><contacts><Contact><contactId>%s</contactId></Contact></contacts></ABContactDelete></soap:Body></soap:Envelope>'''
 
265
 
 
266
# the first %s is Allow or Block, the second is the passport mail
 
267
# POST /abservice/SharingService.asmx HTTP/1.1
 
268
# SOAPAction: http://www.msn.com/webservices/AddressBook/DeleteMember
 
269
# Host: omega.contacts.msn.com
 
270
deleteMember='''<?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>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>%s</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>%s</MemberRole><Members><Member xsi:type="PassportMember" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Type>Passport</Type><State>Accepted</State><PassportName>%s</PassportName></Member></Members></Membership></memberships></DeleteMember></soap:Body></soap:Envelope>'''
 
271
 
 
272
# %s is the group name
 
273
# POST /abservice/abservice.asmx HTTP/1.1
 
274
# SOAPAction: http://www.msn.com/webservices/AddressBook/ABGroupAdd
 
275
# Host: by6.omega.contacts.msn.com
 
276
 
 
277
addGroup='''<?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>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABGroupAdd xmlns="http://www.msn.com/webservices/AddressBook"><abId>00000000-0000-0000-0000-000000000000</abId><groupAddOptions><fRenameOnMsgrConflict>false</fRenameOnMsgrConflict></groupAddOptions><groupInfo><GroupInfo><name>%s</name><groupType>C8529CE2-6EAD-434d-881F-341E17DB3FF8</groupType><fMessenger>false</fMessenger><annotations><Annotation><Name>MSN.IM.Display</Name><Value>1</Value></Annotation></annotations></GroupInfo></groupInfo></ABGroupAdd></soap:Body></soap:Envelope>'''
 
278
 
 
279
 
 
280
# the %s is the gid
 
281
# POST /abservice/abservice.asmx HTTP/1.1
 
282
# SOAPAction: http://www.msn.com/webservices/AddressBook/ABGroupDelete
 
283
# Host: by6.omega.contacts.msn.com
 
284
 
 
285
deleteGroup='''<?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>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABGroupDelete xmlns="http://www.msn.com/webservices/AddressBook"><abId>00000000-0000-0000-0000-000000000000</abId><groupFilter><groupIds><guid>%s</guid></groupIds></groupFilter></ABGroupDelete></soap:Body></soap:Envelope>'''
 
286
 
 
287
# gid, name
 
288
# POST abservice/abservice.asmx HTTP/1.1
 
289
# SOAPAction: http://www.msn.com/webservices/AddressBook/ABGroupUpdate
 
290
# Host: omega.contacts.msn.com/
 
291
 
 
292
renameGroup='''<?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>09607671-1C32-421F-A6A6-CBFAA51AB5F4</ApplicationId><IsMigration>false</IsMigration><PartnerScenario>Timer</PartnerScenario></ABApplicationHeader><ABAuthHeader xmlns="http://www.msn.com/webservices/AddressBook"><ManagedGroupRequest>false</ManagedGroupRequest></ABAuthHeader></soap:Header><soap:Body><ABGroupUpdate xmlns="http://www.msn.com/webservices/AddressBook"><abId>00000000-0000-0000-0000-000000000000</abId><groups><Group><groupId>%s</groupId><groupInfo><name>%s</name></groupInfo><propertiesChanged>GroupName </propertiesChanged></Group></groups></ABGroupUpdate></soap:Body></soap:Envelope>'''
 
293
 
 
294
# MSN OIM module
 
295
 
 
296
# memberName,friendlyName,ver,buildVer,to,passport,appid,lockKey,seqNum,runId,content,
 
297
send_message = '''<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header><From memberName="$memberName" friendlyName="$friendlyName" xml:lang="en-US" proxy="MSNMSGR" xmlns="http://messenger.msn.com/ws/2004/09/oim/" msnpVer="$ver" buildVer="$buildVer"/><To memberName="$to" xmlns="http://messenger.msn.com/ws/2004/09/oim/"/><Ticket passport="$passport" appid="$appid" lockkey="$lockKey" xmlns="http://messenger.msn.com/ws/2004/09/oim/"/><Sequence xmlns="http://schemas.xmlsoap.org/ws/2003/03/rm"><Identifier xmlns="http://schemas.xmlsoap.org/ws/2002/07/utility">http://messenger.msn.com</Identifier><MessageNumber>$seqNum</MessageNumber></Sequence></soap:Header><soap:Body><MessageType xmlns="http://messenger.msn.com/ws/2004/09/oim/">text</MessageType><Content xmlns="http://messenger.msn.com/ws/2004/09/oim/">MIME-Version: 1.0\r\nContent-Type: text/plain; charset=UTF-8\r\nContent-Transfer-Encoding: base64\r\nX-OIM-Message-Type: OfflineMessage\r\nX-OIM-Run-Id: {$runId}\r\nX-OIM-Sequence-Num: $seqNum\r\n\r\n$content</Content></soap:Body></soap:Envelope>'''
 
298
 
 
299
#$t,$p,$mid
 
300
retreive_message = '''<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><PassportCookie xmlns="http://www.hotmail.msn.com/ws/2004/09/oim/rsi"><t>$t</t><p>$p</p></PassportCookie></soap:Header><soap:Body><GetMessage xmlns="http://www.hotmail.msn.com/ws/2004/09/oim/rsi"><messageId>$mid</messageId><alsoMarkAsRead>false</alsoMarkAsRead></GetMessage></soap:Body></soap:Envelope>'''
 
301
 
 
302
#$t,$p,$mid
 
303
delete_message = '''<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><PassportCookie xmlns="http://www.hotmail.msn.com/ws/2004/09/oim/rsi"><t>$t</t><p>$p</p></PassportCookie></soap:Header><soap:Body><DeleteMessages xmlns="http://www.hotmail.msn.com/ws/2004/09/oim/rsi"><messageIds><messageId>$mid</messageId></messageIds></DeleteMessages></soap:Body></soap:Envelope>'''
 
304
 
 
305
#POST /contactcard/contactcardservice.asmx HTTP/1.1
 
306
#Accept: */*
 
307
#SOAPAction: "http://www.msn.com/webservices/spaces/v1/GetXmlFeed"
 
308
#Content-Type: text/xml; charset=utf-8
 
309
#Content-Length: 2117
 
310
#User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; Windows Live Messenger 8.1.0178)
 
311
#Host: cid-580B3F2402D4CDA4.cc.services.spaces.live.com
 
312
#Connection: Keep-Alive
 
313
#Cache-Control: no-cache
 
314
#Cookie: sc_stgclstbl_107=NzcwNTc1NjNjNDQyN2Q5NTE6d092QXNtdnJpUEJSeUxMNDNYTGRQQUViYzg5ZFFQUjJZRDdZWExVQm9XSmIvRlVkVGdURzJGRkI4dXM1QVFiVWdmMXBxTVBPREpIWFJEeXNlbTd5YWo0a3B4dEFqS0J3WERxcjZnWG8vZ3JCSkpqTms4cFN5VVJFNlk3d1RCU1hodnd1eGtmNDFPUWtVT01mYVg2NnJjWmd5NHBKK0hURlJiaUFnNTBBYjFBVm52T3hTeldRUVdJRkRxOEp4N1RDQThNeGN5T080VVJialFzTXVXdEdqYUxyN1B1UjRtTGZveDRRbDBHMXdlektkL0xuYzRQTytBPT0=; sc_identity_107=NGIyNzk5NWRlM2JkYTllODE6alJIOThQVU81Q0ZKOUlaMmkzekh0RjBLeUdkLzVJMnk0OExKeXBkdFBJVGpHNFZHUFR4aHZwemVrRkhrVGFlVkFUaURjRFZJQzErK0VKdlY4Q29qV2tuQ0kwSTFFME1mQnNHMVlPaUhDZ0k9; MUID=3A2C3E4B415C4C838835C3E5C8F46A38; ANON=A=307459359A8E113A91ADF680FFFFFFFF&E=5b8&W=6; NAP=V=1.5&E=55e&C=-8KnBX0ub9dkbKx1pzYK5iyQ3m0FIWFPCTZ-V_Pt7tS8Nan1ZV2Dxg&W=6
 
315
 
 
316
#t,p,cid,storageAuthCache,market
 
317
space='''<?xml version="1.0" ?>
 
318
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 
319
        <soap:Header>
 
320
                <AuthTokenHeader xmlns="http://www.msn.com/webservices/spaces/v1/">
 
321
                        <Token>
 
322
                                t=%s&amp;p=%s
 
323
                        </Token>
 
324
                </AuthTokenHeader>
 
325
        </soap:Header>
 
326
        <soap:Body>
 
327
                <GetXmlFeed xmlns="http://www.msn.com/webservices/spaces/v1/">
 
328
                        <refreshInformation>
 
329
                                <cid xmlns="http://www.msn.com/webservices/spaces/v1/">
 
330
                                        %s
 
331
                                </cid>
 
332
                                <storageAuthCache>
 
333
                                        %s
 
334
                                </storageAuthCache>
 
335
                                <market xmlns="http://www.msn.com/webservices/spaces/v1/">
 
336
                                        %s
 
337
                                </market>
 
338
                                <brand/>
 
339
                                <maxElementCount xmlns="http://www.msn.com/webservices/spaces/v1/">
 
340
                                        2
 
341
                                </maxElementCount>
 
342
                                <maxCharacterCount xmlns="http://www.msn.com/webservices/spaces/v1/">
 
343
                                        200
 
344
                                </maxCharacterCount>
 
345
                                <maxImageCount xmlns="http://www.msn.com/webservices/spaces/v1/">
 
346
                                        6
 
347
                                </maxImageCount>
 
348
                                <applicationId>
 
349
                                        Messenger Client 8.0
 
350
                                </applicationId>
 
351
                                <updateAccessedTime>
 
352
                                        true
 
353
                                </updateAccessedTime>
 
354
                                <spaceLastViewed>
 
355
                                        1753-01-01T00:00:00.0000000-00:00
 
356
                                </spaceLastViewed>
 
357
                                <profileLastViewed>
 
358
                                        1753-01-01T00:00:00.0000000-00:00
 
359
                                </profileLastViewed>
 
360
                                <contactProfileLastViewed>
 
361
                                        1753-01-01T00:00:00.0000000-00:00
 
362
                                </contactProfileLastViewed>
 
363
                                <isActiveContact>
 
364
                                        false
 
365
                                </isActiveContact>
 
366
                        </refreshInformation>
 
367
                </GetXmlFeed>
 
368
        </soap:Body>
 
369
</soap:Envelope>'''
 
370
 
 
371
#url "http://storage.msn.com/storageservice/schematizedstore.asmx"
 
372
#action "http://www.msn.com/webservices/storage/w10/GetItemVersion"
 
373
 
 
374
#name
 
375
schematizedStore = '''<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><StorageApplicationHeader xmlns="http://www.msn.com/webservices/storage/w10"><ApplicationID>Messenger Client 7.0</ApplicationID></StorageApplicationHeader><StorageUserHeader xmlns="http://www.msn.com/webservices/storage/w10"><Puid>0</Puid><UserAuthCache></UserAuthCache><IPAddress/></StorageUserHeader></soap:Header><soap:Body><GetItemVersion xmlns="http://www.msn.com/webservices/storage/w10"><spaceVersionRequests>
 
376
<SpaceVersionRequest><SpaceHandle><RelationshipName>MySpace</RelationshipName><Alias><NameSpace>MyStuff</NameSpace><Name>%s</Name></Alias></SpaceHandle><LastModifiedDate>2004-01-01T00:00:00.0000000-08:00</LastModifiedDate></SpaceVersionRequest></spaceVersionRequests><spaceRequestFilter><SpaceFilterAttributes>Annotation</SpaceFilterAttributes><FilterValue>1</FilterValue></spaceRequestFilter></GetItemVersion></soap:Body></soap:Envelope>'''
 
377
 
 
378
#t, p
 
379
getMailData = '''<?xml version="1.0" encoding="utf-8"?> 
 
380
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
 
381
  <soap:Header>
 
382
    <PassportCookie xmlns="http://www.hotmail.msn.com/ws/2004/09/oim/rsi">
 
383
      <t>%s</t> 
 
384
      <p>%s</p>
 
385
    </PassportCookie>
 
386
  </soap:Header>
 
387
  <soap:Body>
 
388
    <GetMetadata xmlns="http://www.hotmail.msn.com/ws/2004/09/oim/rsi" />
 
389
  </soap:Body>
 
390
</soap:Envelope>'''