root/releases/bedework-3.7/resources/exsynchwsdefs/wsmessages.xsd

Revision 3164 (checked in by douglm, 2 years ago)

Build changes - bring up to date with trunk
icalendar schema changes
timezone schema stuff

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