root/trunk/resources/exsynchwsdefs/wsmessages.xsd

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

Commit the start of the bedework end of the exchange synch process.

New wsimport task for caldav build.
XML schema files in resource directory.
New web service classes

Also make a start on easing process of changing version. Versions defined in build.properties files.

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         targetNamespace="http://www.bedework.org/exsynch/wsmessages"
6         elementFormDefault="qualified">
7   <import schemaLocation="iCalendar.xsd"
8           namespace="urn:ietf:params:xml:ns:icalendar-2.0" />
9   <!-- Schema for messages passed from exsynch processor to the remote service. -->
10  
11   <simpleType name="SynchType">
12     <annotation>
13       <documentation xml:lang="en">
14            from... synch from that end
15            both  both ways - server tries to resolve conflicts
16            both...Master - Named service wins in conflicts.
17       </documentation>
18     </annotation>
19     <restriction base="string">
20       <enumeration value="fromExchange" />
21       <enumeration value="toExchange" />
22       <enumeration value="both" />
23       <enumeration value="bothExchangeMaster" />
24       <enumeration value="bothRemoteMaster" />
25     </restriction>
26   </simpleType>
27  
28   <simpleType name="StatusType">
29     <restriction base="string">
30       <enumeration value="OK" />
31       <enumeration value="Already subscribed" />
32       <enumeration value="Unknown Exchange calendar" />
33       <enumeration value="Invalid token" />
34       <enumeration value="Unknown subscription" />
35       <enumeration value="Error" />
36     </restriction>
37   </simpleType>
38  
39   <!-- *********************************************************************
40        Remote system to syncher
41        subscribe: set up a new subscription for a principal to a calendar
42        unsubscribe: remove a new subscription for a principal to a calendar
43        ********************************************************************* -->
44  
45   <element name="subscribe">
46     <annotation>
47       <documentation xml:lang="en">
48            Message from remote service requesting new subscription.
49            token
50                  Sent in initial startup request
51            principal-href
52                  Principal requesting the subscription.
53            synch-token
54                  Passed back for operations on the calendar
55            exchange-user
56                  Userid for exchange
57            exchange-encpw
58                  Encoded password for exchange
59       </documentation>
60     </annotation>
61     <complexType>
62       <sequence >
63         <element name="token" type="string" />
64         <element name="calendar-href" type="string" />
65         <element name="principal-href" type="string" />
66         <element name="synch-token" type="string" />
67         <element name="exchange-folder-id" type="string" />
68         <element name="exchange-uri" type="string" />
69         <element name="synch-type" type="tns:SynchType" />
70         <element name="exchange-user" type="string" />
71         <element name="exchange-encpw" type="string" />
72       </sequence>
73     </complexType>
74   </element>
75  
76   <element name="subscribeResponse">
77     <annotation>
78       <documentation xml:lang="en">
79            Response to message from remote service requesting new subscription.
80       </documentation>
81     </annotation>
82     <complexType>
83       <sequence >
84         <element name="calendar-href" type="string" />
85         <element name="subscribe-status" type="tns:StatusType" />
86         <element minOccurs="0" name="message" type="string" />
87       </sequence>
88     </complexType>
89   </element>
90  
91   <element name="unsubscribe">
92     <annotation>
93       <documentation xml:lang="en">
94            Message from remote service unsubscribing - same response as subscribe.
95       </documentation>
96     </annotation>
97     <complexType>
98       <sequence>
99         <element name="calendar-href" type="string" />
100         <element name="principal-href" type="string" />
101       </sequence>
102     </complexType>
103   </element>
104  
105   <!-- *********************************************************************
106        Syncher to Remote system
107        start-service-notification; sent to (re)initialise the service
108        get-sycnch-info: return info used to synch
109        fetch: fetch one or more calendar items
110        add: add a new calendar item
111        update: update a calendar item
112        delete: delete a calendar item
113        ********************************************************************* -->
114  
115   <element name="start-service-notification">
116     <annotation>
117       <documentation xml:lang="en">
118            (Re)initialize the service
119            subscribe-url: callback url for notifications and subscribe requests
120            token: random token for subscribe requests. If token is unchanged this
121                is just a keep alive ping
122       </documentation>
123     </annotation>
124     <complexType>
125       <sequence>
126         <element name="subscribe-url" type="string" />
127         <element name="token" type="string" />
128       </sequence>
129     </complexType>
130   </element>
131  
132   <element name="start-service-response">
133     <annotation>
134       <documentation xml:lang="en">
135            Respond to the ping
136            token: sent in initial request
137            status: OK
138       </documentation>
139     </annotation>
140     <complexType>
141       <sequence>
142         <element name="token" type="string" />
143         <element name="status" type="tns:StatusType" />
144       </sequence>
145     </complexType>
146   </element>
147  
148   <element name="get-sycnch-info">
149     <annotation>
150       <documentation xml:lang="en">
151            Message to remote service requesting synchronization info.
152       </documentation>
153     </annotation>
154     <complexType>
155       <sequence>
156         <element name="calendar-href" type="string" />
157         <element name="principal-href" type="string" />
158         <element name="synch-token" type="string" />
159       </sequence>
160     </complexType>
161   </element>
162  
163   <complexType name="SynchInfoType">
164     <sequence>
165       <element name="uid" type="string" />
166       <element name="exchange-lastmod" type="string" />
167     </sequence>
168   </complexType>
169  
170   <element name="synch-info-response">
171     <annotation>
172       <documentation xml:lang="en">
173            Response to message to remote service requesting synchronization info.
174       </documentation>
175     </annotation>
176     <complexType>
177       <sequence>
178         <element name="calendar-href" type="string" />
179         <element name="synch-info-responses">
180           <complexType>
181             <sequence>
182               <element maxOccurs="unbounded" name="synch-info"
183                        type="tns:SynchInfoType" />
184             </sequence>
185           </complexType>
186         </element>
187       </sequence>
188     </complexType>
189   </element>
190  
191   <element name="add-item">
192     <annotation>
193       <documentation xml:lang="en">
194            Message to add a calendar item.
195       </documentation>
196     </annotation>
197     <complexType>
198       <sequence>
199         <element name="synch-token" type="string" />
200         <element name="calendar-href" type="string" />
201         <element name="principal-href" type="string" />
202         <element name="icalendar" type="xcal:icalendarType" />
203       </sequence>
204     </complexType>
205   </element>
206  
207   <element name="add-item-response">
208     <annotation>
209       <documentation xml:lang="en">
210            Response to message to add an item.
211       </documentation>
212     </annotation>
213     <complexType>
214       <sequence>
215         <element name="status" type="tns:StatusType" />
216       </sequence>
217     </complexType>
218   </element>
219 </schema>
Note: See TracBrowser for help on using the browser.