root/trunk/resources/exsynchwsdefs/wsmessages.xsd

Revision 3063 (checked in by douglm, 3 years ago)

Changes to schema allow for update

Line 
1 <?xml version="1.0" encoding="UTF-8"?>
2 <schema xmlns="http://www.w3.org/2001/XMLSchema"
3         xmlns:tns="http://www.bedework.org/exsynch/wsmessages"
4         xmlns:xcal="urn:ietf:params:xml:ns:icalendar-2.0"
5         xmlns:xcup="urn:ietf:params:xml:ns:icalendar-upd-1.0"
6         targetNamespace="http://www.bedework.org/exsynch/wsmessages"
7         elementFormDefault="qualified">
8        
9   <import schemaLocation="iCalendar.xsd"
10           namespace="urn:ietf:params:xml:ns:icalendar-2.0" />
11        
12   <import schemaLocation="iCalendar-update.xsd"
13           namespace="urn:ietf:params:xml:ns:icalendar-upd-1.0" />
14          
15   <!-- Schema for messages passed from exsynch processor to the remote service. -->
16  
17   <simpleType name="SynchType">
18     <annotation>
19       <documentation xml:lang="en">
20            from... synch from that end
21            both  both ways - server tries to resolve conflicts
22            both...Master - Named service wins in conflicts.
23       </documentation>
24     </annotation>
25     <restriction base="string">
26       <enumeration value="fromExchange" />
27       <enumeration value="toExchange" />
28       <enumeration value="both" />
29       <enumeration value="bothExchangeMaster" />
30       <enumeration value="bothRemoteMaster" />
31     </restriction>
32   </simpleType>
33  
34   <simpleType name="StatusType">
35     <restriction base="string">
36       <enumeration value="OK" />
37       <enumeration value="Already subscribed" />
38       <enumeration value="Unknown Exchange calendar" />
39       <enumeration value="Invalid token" />
40       <enumeration value="Unknown subscription" />
41       <enumeration value="No Access" />
42       <enumeration value="Service Stopped" />
43       <enumeration value="Error" />
44     </restriction>
45   </simpleType>
46  
47   <complexType name="base-synch-request">
48     <annotation>
49       <documentation xml:lang="en">
50            Requests have this as the base type.
51       </documentation>
52     </annotation>
53     <sequence>
54       <element name="calendar-href" type="string" minOccurs="1" />
55       <element name="principal-href" type="string" minOccurs="1" />
56       <element name="synch-token" type="string" minOccurs="1" />
57     </sequence>
58   </complexType>
59  
60   <complexType name="base-synch-entity-request">
61     <annotation>
62       <documentation xml:lang="en">
63            Message from remote service identifying an entity by it's UID and
64            optionally its recurrenceid.
65       </documentation>
66     </annotation>
67     <complexContent mixed="false">
68       <extension base="tns:base-synch-request">
69         <sequence >
70           <element name="uid" type="string" minOccurs="1" />
71           <element name="recurrence-id" type="string" />
72         </sequence>
73       </extension>
74     </complexContent>
75   </complexType>
76  
77   <complexType name="base-synch-response">
78     <annotation>
79       <documentation xml:lang="en">
80            Responses have this as the base type.
81       </documentation>
82     </annotation>
83     <sequence>
84       <element name="subscribe-status" type="tns:StatusType" />
85     </sequence>
86   </complexType>
87  
88   <!-- *********************************************************************
89        Remote system to syncher
90        subscribe: set up a new subscription for a principal to a calendar
91        unsubscribe: remove a new subscription for a principal to a calendar
92        ********************************************************************* -->
93  
94   <complexType name="subscribe-request-type">
95     <annotation>
96       <documentation xml:lang="en">
97            Message from remote service requesting new subscription.
98            token
99                  Sent in initial startup request
100            principal-href
101                  Principal requesting the subscription.
102            synch-token
103                  Passed back for operations on the calendar
104            exchange-user
105                  Userid for exchange
106            exchange-encpw
107                  Encoded password for exchange
108       </documentation>
109     </annotation>
110     <complexContent mixed="false">
111       <extension base="tns:base-synch-request">
112         <sequence >
113           <element name="token" type="string" />
114           <element name="exchange-folder-id" type="string" />
115           <element name="exchange-uri" type="string" />
116           <element name="synch-type" type="tns:SynchType" />
117           <element name="exchange-user" type="string" />
118           <element name="exchange-encpw" type="string" />
119         </sequence>
120       </extension>
121     </complexContent>
122   </complexType>
123
124   <element name="subscribe" type="tns:subscribe-request-type" />
125  
126   <complexType name="subscribe-response-type">
127     <annotation>
128       <documentation xml:lang="en">
129            Response to message from remote service requesting new subscription.
130       </documentation>
131     </annotation>
132     <complexContent mixed="false">
133       <extension base="tns:base-synch-response">
134         <sequence >
135           <element name="subscription-id" type="string" />
136           <element minOccurs="0" name="message" type="string" />
137         </sequence>
138       </extension>
139     </complexContent>
140   </complexType>
141
142   <element name="subscribe-response" type="tns:subscribe-response-type" />
143  
144   <complexType name="unsubscribe-request-type">
145     <annotation>
146       <documentation xml:lang="en">
147            Message from remote service unsubscribing.
148       </documentation>
149     </annotation>
150     <complexContent mixed="false">
151       <extension base="tns:base-synch-request">
152         <sequence >
153           <element name="subscription-id" type="string" />
154         </sequence>
155       </extension>
156     </complexContent>
157   </complexType>
158
159   <element name="unsubscribe" type="tns:unsubscribe-request-type" />
160  
161   <complexType name="unsubscribe-response-type">
162     <annotation>
163       <documentation xml:lang="en">
164            Response to message from remote service requesting unsubscription.
165       </documentation>
166     </annotation>
167     <complexContent mixed="false">
168       <extension base="tns:base-synch-response">
169       </extension>
170     </complexContent>
171   </complexType>
172
173   <element name="unsubscribe-response" type="tns:unsubscribe-response-type" />
174  
175   <!-- *********************************************************************
176        Syncher to Remote system
177        start-service-notification; sent to (re)initialise the service
178        get-sycnch-info: return info used to synch
179        fetch: fetch one or more calendar items
180        add: add a new calendar item
181        update: update a calendar item
182        delete: delete a calendar item
183        ********************************************************************* -->
184  
185   <complexType name="start-service-notificationType">
186     <annotation>
187       <documentation xml:lang="en">
188            (Re)initialize the service
189            subscribe-url: callback url for notifications and subscribe requests
190            token: random token for subscribe requests. If token is unchanged this
191                is just a keep alive ping
192       </documentation>
193     </annotation>
194     <sequence>
195       <element name="subscribe-url" type="string" />
196       <element name="token" type="string" />
197     </sequence>
198   </complexType>
199  
200   <element name="start-service-notification"
201            type="tns:start-service-notificationType" />
202  
203   <complexType name="start-service-response-type">
204     <annotation>
205       <documentation xml:lang="en">
206            Respond to the ping
207            token: sent in initial request
208            status: OK
209       </documentation>
210     </annotation>
211     <sequence>
212       <element name="token" type="string" />
213       <element name="status" type="tns:StatusType" />
214     </sequence>
215   </complexType>
216
217   <element name="start-service-response" type="tns:start-service-response-type" />
218  
219   <complexType name="get-sycnch-info-type">
220     <annotation>
221       <documentation xml:lang="en">
222            Message to remote service requesting synchronization info.
223       </documentation>
224     </annotation>
225     <complexContent mixed="false">
226       <extension base="tns:base-synch-request"/>
227     </complexContent>
228   </complexType>
229  
230   <element name="get-sycnch-info" type="tns:get-sycnch-info-type" />
231  
232   <complexType name="SynchInfoType">
233     <sequence>
234       <element name="uid" type="string" />
235       <element name="exchange-lastmod" type="string" />
236     </sequence>
237   </complexType>
238  
239   <complexType name="synch-info-response-type">
240     <annotation>
241       <documentation xml:lang="en">
242            Response to message to remote service requesting synchronization info.
243       </documentation>
244     </annotation>
245     <sequence>
246       <element name="calendar-href" type="string" />
247       <element name="synch-info-responses">
248         <complexType>
249           <sequence>
250             <element maxOccurs="unbounded" name="synch-info"
251                      type="tns:SynchInfoType" />
252           </sequence>
253         </complexType>
254       </element>
255     </sequence>
256   </complexType>
257  
258   <element name="synch-info-response" type="tns:synch-info-response-type" />
259
260   <!-- ============================ add-item =============================== -->
261  
262   <complexType name="add-item-type">
263     <annotation>
264       <documentation xml:lang="en">
265            Message to add a calendar item.
266       </documentation>
267     </annotation>
268     <complexContent mixed="false">
269       <extension base="tns:base-synch-entity-request">
270         <sequence>
271           <element name="icalendar" type="xcal:icalendarType" />
272         </sequence>
273       </extension>
274     </complexContent>
275   </complexType>
276  
277   <element name="add-item" type="tns:add-item-type" />
278  
279   <complexType name="add-item-response-type">
280     <annotation>
281       <documentation xml:lang="en">
282            Response to message to add an item.
283       </documentation>
284     </annotation>
285     <sequence>
286       <element name="status" type="tns:StatusType" />
287       <element name="message" type="string" />
288     </sequence>
289   </complexType>
290  
291   <element name="add-item-response" type="tns:add-item-response-type" />
292
293   <!-- ============================ add-item =============================== -->
294  
295   <complexType name="fetch-item-type">
296     <annotation>
297       <documentation xml:lang="en">
298            Message to fetch a calendar item.
299       </documentation>
300     </annotation>
301     <complexContent mixed="false">
302       <extension base="tns:base-synch-entity-request"/>
303     </complexContent>
304   </complexType>
305  
306   <element name="fetch-item" type="tns:fetch-item-type" />
307  
308   <complexType name="fetch-item-response-type">
309     <annotation>
310       <documentation xml:lang="en">
311            Response to message to fetch an item.
312       </documentation>
313     </annotation>
314     <sequence>
315       <element name="icalendar" type="xcal:icalendarType" />
316       <element name="status" type="tns:StatusType" />
317       <element name="message" type="string" />
318     </sequence>
319   </complexType>
320  
321   <element name="fetch-item-response" type="tns:fetch-item-response-type" />
322
323   <!-- ========================== update-item ============================== -->
324  
325   <complexType name="update-item-type">
326     <annotation>
327       <documentation xml:lang="en">
328            Message to update a calendar item.
329       </documentation>
330     </annotation>
331     <complexContent mixed="false">
332       <extension base="tns:base-synch-entity-request">
333         <sequence>
334           <element ref="xcup:updates" />
335         </sequence>
336       </extension>
337     </complexContent>
338   </complexType>
339  
340   <element name="update-item" type="tns:update-item-type" />
341  
342   <complexType name="update-item-response-type">
343     <annotation>
344       <documentation xml:lang="en">
345            Response to message to update an item.
346       </documentation>
347     </annotation>
348     <sequence>
349       <element name="status" type="tns:StatusType" />
350       <element name="message" type="string" />
351     </sequence>
352   </complexType>
353  
354   <element name="update-item-response" type="tns:update-item-response-type" />
355 </schema>
Note: See TracBrowser for help on using the browser.