1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <!--
3
+ #########################################################################################################
4
+ # Description: Schema for Common Integration Header and Footer
5
+ # Revision: 1.11.1
6
+ # Date: 10/08/2015
7
+ # Owner: Mark Cornforth (RMG Enterpris e Integration Architect)
8
+ # Canonical Model: Aligned RMG Canonical Model (CM) v2.3
9
+ #########################################################################################################
10
+ # History:
11
+ # Version Date Author Description of Change
12
+ # v1.0 07/05/2013 Mark Cornforth Initial version created
13
+ # v1.1 08/05/2013 Mark Cornforth Amendments made following internal review feedback.
14
+ # Changed serviceRequesterId to applicationId to make this more generic for
15
+ # internal and external use.
16
+ # v1.2 05/06/2013 Mark Cornforth date element changed to dateTime to capture the date and timestamp
17
+ # associated with when the message was generated.
18
+ # v1.3 11/06/2013 Mark Cornforth Added 'testFlag' and 'debugFlag' elements following external review.
19
+ # v1.4 17/06/2013 Mark Cornforth File renamed and updated to include integrationFooter elements for returing
20
+ # one or more business error or warning messages in the response.
21
+ # Added 'endUserId' element to optionally capture details of the end user.
22
+ # v1.5 25/06/2013 Mark Cornforth integrationFooter updated to refer to errorStructure and warningStructure
23
+ # (as opposed to errorDetail and warningDetail)
24
+ # v1.6 16/07/2013 Mark Cornforth Corrected some typos within the annotations
25
+ # v1.7 12/11/2013 Mark Cornforth transactionId and applicationId fields updated with a pattern restriction to
26
+ # address security vulnerability which allows unfiltered values which may
27
+ # lead to a possible XSS attack.
28
+ # v1.8 13/11/2013 Mark Cornforth Patterns for transactionId and applicationId elements relaxed
29
+ # v1.9 12/12/2013 Mark Cornforth applicationId restriction updated to allow the '-' character.
30
+ # transactionId restriction updated to allow the '-' and '/' characters.
31
+ # Aligned to canonical message release v2.2.
32
+ # v1.10 03/07/2014 Mark Cornforth Updated to reference v2.3 of the Canonical Data Model (CDM) release.
33
+ # v1.11 07/07/2014 Mark Cornforth Added 'performanceFlag' element to optionally capture performance data.
34
+ # v1.11.1 10/08/2015 Mark Cornforth Updated pattern restriction on applicationId and transactionId elements
35
+ #########################################################################################################
36
+ # Guidance:
37
+ # (1) The integrationHeader construct must be used for all web service request and response messages
38
+ # (2) The integrationFooter construct must be used for all web service response messages when communicating business
39
+ # errors and/or warning messages
40
+ #########################################################################################################
41
+ --> <xs : schema attributeFormDefault =" qualified" elementFormDefault =" qualified" targetNamespace =" http://www.royalmailgroup.com/integration/core/V1" version =" 1.11.1" xmlns : dt =" http://www.royalmailgroup.com/cm/rmDatatypes/V1" xmlns : int =" http://www.royalmailgroup.com/integration/core/V1" xmlns : xs =" http://www.w3.org/2001/XMLSchema" >
42
+ <xs : import namespace =" http://www.royalmailgroup.com/cm/rmDatatypes/V1" schemaLocation =" DatatypesV2_3.xsd" />
43
+ <!-- Define elements used for Integration Header definition -->
44
+ <xs : simpleType name =" applicationId" >
45
+ <xs : annotation >
46
+ <xs : documentation >For a request, this is the ID of the Service Requester calling the service, unique when combined with the TransactionId. For the response, this is the ID of the Service Provider, unique when combined with the TransactionId.</xs : documentation >
47
+ </xs : annotation >
48
+ <xs : restriction base =" dt:identifier" >
49
+ <xs : maxLength value =" 50" />
50
+ <xs : whiteSpace value =" preserve" />
51
+ <xs : minLength value =" 1" />
52
+ <xs : pattern value =" [a-zA-Z0-9/\-]*" />
53
+ </xs : restriction >
54
+ </xs : simpleType >
55
+ <xs : simpleType name =" transactionId" >
56
+ <xs : annotation >
57
+ <xs : documentation >Id preserved throughout the lifespan of the transaction, unique when combined with the applicationId and intermediaryId (if applicable).</xs : documentation >
58
+ </xs : annotation >
59
+ <xs : restriction base =" dt:identifier" >
60
+ <xs : maxLength value =" 50" />
61
+ <xs : whiteSpace value =" preserve" />
62
+ <xs : minLength value =" 1" />
63
+ <xs : pattern value =" [a-zA-Z0-9/\-]*" />
64
+ </xs : restriction >
65
+ </xs : simpleType >
66
+ <xs : complexType name =" identificationStructure" >
67
+ <xs : sequence >
68
+ <xs : element minOccurs =" 0" name =" endUserId" nillable =" false" type =" dt:identifier" >
69
+ <xs : annotation >
70
+ <xs : documentation >User ID associated with the end user of the internal or external organisation</xs : documentation >
71
+ </xs : annotation >
72
+ </xs : element >
73
+ <xs : element name =" applicationId" type =" int:applicationId" >
74
+ <xs : annotation >
75
+ <xs : documentation >The ID of the Service Requester system calling the service, unique when combined with the transactionId.</xs : documentation >
76
+ </xs : annotation >
77
+ </xs : element >
78
+ <xs : element minOccurs =" 0" name =" intermediaryId" nillable =" false" type =" int:applicationId" >
79
+ <xs : annotation >
80
+ <xs : documentation >Id associated with the Intermediary application (if applicable).</xs : documentation >
81
+ </xs : annotation >
82
+ </xs : element >
83
+ <xs : element name =" transactionId" type =" int:transactionId" >
84
+ <xs : annotation >
85
+ <xs : documentation >Unique session id sent by the Service Requestor (for the request) or returned by the Service Provider (for the response)</xs : documentation >
86
+ </xs : annotation >
87
+ </xs : element >
88
+ </xs : sequence >
89
+ </xs : complexType >
90
+ <xs : complexType name =" integrationHeader" >
91
+ <xs : annotation >
92
+ <xs : documentation >Common integration header definition</xs : documentation >
93
+ </xs : annotation >
94
+ <xs : sequence >
95
+ <xs : element minOccurs =" 0" name =" dateTime" nillable =" false" type =" dt:dateTime" >
96
+ <xs : annotation >
97
+ <xs : documentation >Date timestamp associated with when the data was generated, sent or received</xs : documentation >
98
+ </xs : annotation >
99
+ </xs : element >
100
+ <xs : element minOccurs =" 0" name =" version" type =" dt:decimal" >
101
+ <xs : annotation >
102
+ <xs : documentation >Version of the service</xs : documentation >
103
+ </xs : annotation >
104
+ </xs : element >
105
+ <xs : element name =" identification" type =" int:identificationStructure" >
106
+ <xs : annotation >
107
+ <xs : documentation >Identification details associated with the Service Requestor or Service Provider</xs : documentation >
108
+ </xs : annotation >
109
+ </xs : element >
110
+ <xs : element minOccurs =" 0" name =" testFlag" type =" dt:boolean" >
111
+ <xs : annotation >
112
+ <xs : documentation >Flag which can be used to test that the exposed service is available. It is not expected that this flag will be used under normal BAU service operation.</xs : documentation >
113
+ </xs : annotation >
114
+ </xs : element >
115
+ <xs : element minOccurs =" 0" name =" debugFlag" type =" dt:boolean" >
116
+ <xs : annotation >
117
+ <xs : documentation >Flag which can be used to allow any messages to be dynamically debugged. It is not expected that this flag will be used under normal BAU service operation.</xs : documentation >
118
+ </xs : annotation >
119
+ </xs : element >
120
+ <xs : element minOccurs =" 0" name =" performanceFlag" type =" dt:boolean" >
121
+ <xs : annotation >
122
+ <xs : documentation >Flag which can be used to track the performance of the service across RMG systems (entry time, exit time, latency etc).</xs : documentation >
123
+ </xs : annotation >
124
+ </xs : element >
125
+ </xs : sequence >
126
+ </xs : complexType >
127
+ <!-- Define elements used for Integration Footer definition -->
128
+ <xs : simpleType name =" errorCode" >
129
+ <xs : annotation >
130
+ <xs : documentation >Code associated with the error condition in the form ENNNN</xs : documentation >
131
+ </xs : annotation >
132
+ <xs : restriction base =" dt:identifier" >
133
+ <xs : pattern value =" [E]{1}[0-9]{4}" />
134
+ </xs : restriction >
135
+ </xs : simpleType >
136
+ <xs : simpleType name =" warningCode" >
137
+ <xs : annotation >
138
+ <xs : documentation >Code associated with the warning condition in the form WNNNN</xs : documentation >
139
+ </xs : annotation >
140
+ <xs : restriction base =" dt:identifier" >
141
+ <xs : pattern value =" [W]{1}[0-9]{4}" />
142
+ </xs : restriction >
143
+ </xs : simpleType >
144
+ <xs : complexType name =" errorDetail" >
145
+ <xs : sequence >
146
+ <xs : element name =" errorCode" type =" int:errorCode" >
147
+ <xs : annotation >
148
+ <xs : documentation >Code associated with the error condition</xs : documentation >
149
+ </xs : annotation >
150
+ </xs : element >
151
+ <xs : element name =" errorDescription" type =" dt:description" >
152
+ <xs : annotation >
153
+ <xs : documentation >Description of the error condition</xs : documentation >
154
+ </xs : annotation >
155
+ </xs : element >
156
+ <xs : element minOccurs =" 0" name =" errorCause" type =" dt:description" >
157
+ <xs : annotation >
158
+ <xs : documentation >Cause of the business error (if known)</xs : documentation >
159
+ </xs : annotation >
160
+ </xs : element >
161
+ <xs : element minOccurs =" 0" name =" errorResolution" type =" dt:description" >
162
+ <xs : annotation >
163
+ <xs : documentation >Description of the resolution and action required to correct the error</xs : documentation >
164
+ </xs : annotation >
165
+ </xs : element >
166
+ <xs : element minOccurs =" 0" name =" errorContext" nillable =" true" type =" dt:description" >
167
+ <xs : annotation >
168
+ <xs : documentation >Context of the business error, e.g. client or server</xs : documentation >
169
+ </xs : annotation >
170
+ </xs : element >
171
+ </xs : sequence >
172
+ </xs : complexType >
173
+ <xs : complexType name =" errorStructure" >
174
+ <xs : sequence >
175
+ <xs : element maxOccurs =" unbounded" minOccurs =" 0" name =" error" type =" int:errorDetail" />
176
+ </xs : sequence >
177
+ </xs : complexType >
178
+ <xs : complexType name =" warningDetail" >
179
+ <xs : sequence >
180
+ <xs : element name =" warningCode" type =" int:warningCode" >
181
+ <xs : annotation >
182
+ <xs : documentation >Code associated with the warning</xs : documentation >
183
+ </xs : annotation >
184
+ </xs : element >
185
+ <xs : element name =" warningDescription" type =" dt:description" >
186
+ <xs : annotation >
187
+ <xs : documentation >Description of the warning</xs : documentation >
188
+ </xs : annotation >
189
+ </xs : element >
190
+ <xs : element minOccurs =" 0" name =" warningCause" type =" dt:description" >
191
+ <xs : annotation >
192
+ <xs : documentation >Cause of the warning (if known)</xs : documentation >
193
+ </xs : annotation >
194
+ </xs : element >
195
+ <xs : element minOccurs =" 0" name =" warningResolution" type =" dt:description" >
196
+ <xs : annotation >
197
+ <xs : documentation >Description of the resolution and action required to correct the warning</xs : documentation >
198
+ </xs : annotation >
199
+ </xs : element >
200
+ <xs : element minOccurs =" 0" name =" warningContext" nillable =" true" type =" dt:description" >
201
+ <xs : annotation >
202
+ <xs : documentation >Context of the warning, e.g. client or server</xs : documentation >
203
+ </xs : annotation >
204
+ </xs : element >
205
+ </xs : sequence >
206
+ </xs : complexType >
207
+ <xs : complexType name =" warningStructure" >
208
+ <xs : sequence >
209
+ <xs : element maxOccurs =" unbounded" minOccurs =" 0" name =" warning" type =" int:warningDetail" />
210
+ </xs : sequence >
211
+ </xs : complexType >
212
+ <xs : complexType name =" integrationFooter" >
213
+ <xs : annotation >
214
+ <xs : documentation >Common integration footer definition</xs : documentation >
215
+ </xs : annotation >
216
+ <xs : sequence >
217
+ <xs : element minOccurs =" 0" name =" errors" type =" int:errorStructure" />
218
+ <xs : element minOccurs =" 0" name =" warnings" type =" int:warningStructure" />
219
+ </xs : sequence >
220
+ </xs : complexType >
221
+ <xs : element name =" integrationHeader" type =" int:integrationHeader" />
222
+ <xs : element name =" integrationFooter" type =" int:integrationFooter" />
223
+ </xs : schema >
0 commit comments