initial commit
[BroadWorks-OCI.git] / share / OCISchemaBASE / OCISchemaBASE.xsd
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!-- ********************************************************************** -->\r
3 <!-- Copyright (c) 2004-2005 Broadsoft, Inc.  All rights reserved.          -->\r
4 <!-- ********************************************************************** -->\r
5 <!--       O C I   X M L   S C H E M A  :  C O R E   P A R T                -->\r
6 <!--                                                                        -->\r
7 <!-- This file defines the XML Schema for the BroadSoft Application Server  -->\r
8 <!-- Open Client Interface (OCI).                                           -->\r
9 <!-- ********************************************************************** -->\r
10 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="C" targetNamespace="C">\r
11   <!-- ******************************************************************** -->\r
12   <!-- C O R E   M E S S A G E   T Y P E S                                  -->\r
13   <!-- ******************************************************************** -->\r
14   <!--
15   The following types define the core elements of the messaging protocol.
16   Each message contains a list of Request or Response commands.
17   -->\r
18   <xs:element name="BroadsoftDocument" type="OCIMessage">\r
19     <xs:annotation>\r
20       <xs:documentation>Every Message starts with a BroadsoftDocument tag.</xs:documentation>\r
21     </xs:annotation>\r
22   </xs:element>\r
23   <xs:complexType name="OCIMessage">\r
24     <xs:annotation>\r
25       <xs:documentation>\r
26         A message contains a list of requests or responses. The server processes all the requests\r
27         and returns a message with a corresponding list of responses.\r
28       </xs:documentation>\r
29     </xs:annotation>\r
30     <xs:sequence>\r
31       <xs:choice>\r
32         <xs:element name="sessionId" type="xs:normalizedString">\r
33           <xs:annotation>\r
34             <xs:documentation>\r
35               The session id identifies a logged-in user. The client is responsible to ensure the uniqueness of the session id.\r
36             </xs:documentation>\r
37           </xs:annotation>\r
38         </xs:element>\r
39         <xs:element name="userId" type="xs:token">\r
40           <xs:annotation>\r
41             <xs:documentation>\r
42               The user id identifies a preauthenticated user performing a session-less OCI request. The source of the request\r
43               must be in the external authentication access control list.\r
44             </xs:documentation>\r
45           </xs:annotation>\r
46         </xs:element>\r
47         <xs:element name="phoneNumber" type="xs:token">\r
48           <xs:annotation>\r
49             <xs:documentation>\r
50               The phone number identifies a preauthenticated user performing a session-less OCI request. The source of the request\r
51               must be in the external authentication access control list.\r
52               The phone number must be in E.164 format.  Any DN associated with the user may be used. \r
53               BroadSoft recommends only using this element in the rare case when the userId is not known.\r
54             </xs:documentation>\r
55           </xs:annotation>\r
56         </xs:element>\r
57       </xs:choice>\r
58       <xs:element name="command" type="OCICommand" minOccurs="1" maxOccurs="15">\r
59         <xs:annotation>\r
60           <xs:documentation>List of requests or responses.</xs:documentation>\r
61         </xs:annotation>\r
62       </xs:element>\r
63     </xs:sequence>\r
64     <xs:attribute name="protocol" use="required">\r
65       <xs:simpleType>\r
66         <xs:annotation/>\r
67         <xs:restriction base="xs:NMTOKEN">\r
68           <xs:enumeration value="OCI"/>\r
69           <xs:enumeration value="NSOCI"/>\r
70         </xs:restriction>\r
71       </xs:simpleType>\r
72     </xs:attribute>\r
73   </xs:complexType>\r
74   <xs:complexType name="OCICommand" abstract="true">\r
75     <xs:annotation>\r
76       <xs:documentation>\r
77         The OCICommand is an abstract type from which all requests and responses are derived.\r
78       </xs:documentation>\r
79     </xs:annotation>\r
80     <xs:sequence/>\r
81     <xs:attribute name="echo" type="xs:string" use="optional">\r
82       <xs:annotation>\r
83         <xs:documentation>\r
84           The client can send the echo attribute in any request and the server will return the echo attribute in the response.\r
85         </xs:documentation>\r
86       </xs:annotation>\r
87     </xs:attribute>\r
88   </xs:complexType>\r
89   <xs:complexType name="OCIRequest" abstract="true">\r
90     <xs:annotation>\r
91       <xs:documentation>\r
92         The OCIRequest is an abstract type from which all requests are derived.\r
93       </xs:documentation>\r
94     </xs:annotation>\r
95     <xs:complexContent>\r
96       <xs:extension base="OCICommand">\r
97         <xs:sequence/>\r
98       </xs:extension>\r
99     </xs:complexContent>\r
100   </xs:complexType>\r
101   <xs:complexType name="OCIResponse" abstract="true">\r
102     <xs:annotation>\r
103       <xs:documentation>\r
104         The OCIResponse is an abstract type from which all responses are derived.\r
105       </xs:documentation>\r
106     </xs:annotation>\r
107     <xs:complexContent>\r
108       <xs:extension base="OCICommand">\r
109         <xs:sequence/>\r
110         <xs:attribute name="debugInfo" type="xs:string" use="optional">\r
111           <xs:annotation>\r
112             <xs:documentation>\r
113               Used during software development only. Will never be used in a production system.\r
114             </xs:documentation>\r
115           </xs:annotation>\r
116         </xs:attribute>\r
117       </xs:extension>\r
118     </xs:complexContent>\r
119   </xs:complexType>\r
120   <xs:complexType name="OCIDataResponse" abstract="true">\r
121     <xs:annotation>\r
122       <xs:documentation>\r
123         The OCIDataResponse is an abstract base type for all responses containing some sort of data other than\r
124         merely a success or failure indication.\r
125       </xs:documentation>\r
126     </xs:annotation>\r
127     <xs:complexContent>\r
128       <xs:extension base="OCIResponse">\r
129         <xs:sequence/>\r
130       </xs:extension>\r
131     </xs:complexContent>\r
132   </xs:complexType>\r
133   <xs:complexType name="SuccessResponse">\r
134     <xs:annotation>\r
135       <xs:documentation>\r
136         The SuccessResponse is concrete response sent whenever a transaction is successful and does not return any data.\r
137       </xs:documentation>\r
138     </xs:annotation>\r
139     <xs:complexContent>\r
140       <xs:extension base="OCIResponse">\r
141         <xs:sequence/>\r
142       </xs:extension>\r
143     </xs:complexContent>\r
144   </xs:complexType>\r
145   <xs:complexType name="ErrorResponse">\r
146     <xs:annotation>\r
147       <xs:documentation>\r
148         The ErrorResponse is concrete response sent whenever a transaction fails and does not return any data.\r
149       </xs:documentation>\r
150     </xs:annotation>\r
151     <xs:complexContent>\r
152       <xs:extension base="OCIResponse">\r
153         <xs:sequence>\r
154           <xs:element name="errorCode" type="xs:int" minOccurs="0"/>\r
155           <xs:element name="summary" type="xs:string"/>\r
156           <xs:element name="summaryEnglish" type="xs:string"/>\r
157           <xs:element name="detail" type="xs:string" minOccurs="0"/>\r
158         </xs:sequence>\r
159         <xs:attribute name="type" use="required">\r
160           <xs:simpleType>\r
161             <xs:annotation/>\r
162             <xs:restriction base="xs:NMTOKEN">\r
163               <xs:enumeration value="Error"/>\r
164               <xs:enumeration value="Warning"/>\r
165               <xs:enumeration value="Info"/>\r
166             </xs:restriction>\r
167           </xs:simpleType>\r
168         </xs:attribute>\r
169       </xs:extension>\r
170     </xs:complexContent>\r
171   </xs:complexType>\r
172   <!-- ******************************************************************** -->\r
173   <!-- M E S S A G E   P A R A M E T E R S                                  -->\r
174   <!-- ******************************************************************** -->\r
175   <!--
176   The non-primitive attributes are listed here in alphabetical order.
177   -->\r
178   <xs:complexType name="OCITable">\r
179     <xs:annotation>\r
180       <xs:documentation>\r
181         The OCITable type is used in responses only, never in requests.\r
182         The table consists of rows and columns of strings. Each column has a column\r
183         heading. Clients should search the column headings to find a particular\r
184         column. Clients should not assume any particular column order as future\r
185         revisions of the protocol may move or add columns.\r
186       </xs:documentation>\r
187     </xs:annotation>\r
188     <xs:sequence>\r
189       <xs:element name="colHeading" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>\r
190       <xs:element name="row" type="OCITableRow" minOccurs="0" maxOccurs="unbounded"/>\r
191     </xs:sequence>\r
192   </xs:complexType>\r
193   <xs:complexType name="OCITableRow">\r
194     <xs:annotation>\r
195       <xs:documentation>\r
196         The OCITableRow type is used in responses only, never in requests. It occurs\r
197         inside the OCITable type. The OCITableRow consists columns of strings.\r
198         Clients should not assume any particular column order as future\r
199         revisions of the protocol may move or add columns. See the OCITable data type\r
200         for more information.\r
201       </xs:documentation>\r
202     </xs:annotation>\r
203     <xs:sequence>\r
204       <xs:element name="col" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>\r
205     </xs:sequence>\r
206   </xs:complexType>\r
207 </xs:schema>\r