Changes for page Exercises

Last modified by Carlijn Kokkeler on 2022/10/19 13:32

From version 18.1
edited by eMagiz
on 2022/10/19 12:43
Change comment: There is no comment for this version
To version 15.1
edited by Carlijn Kokkeler
on 2022/10/19 12:29
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.eMagiz
1 +XWiki.CarlijnKokkeler
Content
... ... @@ -15,26 +15,22 @@
15 15  By following the steps below, you should gain a better understanding of the differences between CDM, CDM messages, and system messages.
16 16  
17 17  * Creating a CDM
18 - ** Please import the file Order.xsd in your CDM. The code for this file can be found in section 4. Code for xsd files.
18 + Please import the file Order.xsd in your CDM. The code for this file can be found in section 4. Code for xsd files.
19 19  * Creating a CDM message
20 - ** Now, go to your CDM message and select Order as root entity.
21 - ** Add all other entities and attributes from Order.xsd, which were imported into the CDM, to your CDM message definition.
20 + Now, go to your CDM message and select Order as root entity.
21 + Add all other entities and attributes from Order.xsd, which were imported into the CDM, to your CDM message definition.
22 22  * Creating a system message
23 - ** In one of your System messages, import the file TransportOrder.xsd. The code for this file can be found at the bottom of this page.
23 + In one of your System messages, import the file TransportOrder.xsd. The code for this file can be found at the bottom of this page.
24 24  * Creating a CDM message
25 - ** Select CreateOrder as root entity and add all other entities and attributes to your system definition.
25 + Select CreateOrder as root entity and add all other entities and attributes to your system definition.
26 26  * Complete message mapping
27 - ** Now that you have completed these steps, go to Message mapping and complete the mapping. Please add the following to the Design mapping
28 - *** Ensure to properly map the address type
29 - *** Ensure to properly document mappings where required
30 - *** Ensure to use
31 -
27 + Now that you have completed these steps, go to Message mapping and complete the mapping.
32 32  
33 33  The solutions to these exercises can be found [[here>>doc:Main.eMagiz Academy.Use Cases.Data modeling in Design.Exercises.Solutions.WebHome||target="blank"]].
34 34  
35 35  == 4. Code for xsd files ==
36 -=== 4.1 Code for Order.xsd ===
37 -{{code language="xml"}}
32 +Order.xsd:
33 + {{code language="xsd"}}
38 38  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
39 39   xmlns="http://www.carlijnsplatform.com/ns/capetms/cdm/1.0/"
40 40   attributeFormDefault="unqualified"
... ... @@ -92,145 +92,6 @@
92 92   <xs:element name="Order" type="Order"/>
93 93  </xs:schema>
94 94  {{/code}}
95 -
96 -=== 4.2 Code for TransportOrder.xsd ===
97 -{{code language="xml"}}
98 -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
99 - xmlns="https://transportinc.nl/ns/tms/1.0/"
100 - attributeFormDefault="unqualified"
101 - elementFormDefault="unqualified"
102 - targetNamespace="https://transportinc.nl/ns/tms/1.0/">
103 - <xs:complexType name="CreateOrder">
104 - <xs:sequence>
105 - <xs:element name="Order" type="Order"/>
106 - </xs:sequence>
107 - </xs:complexType>
108 - <xs:complexType name="Order">
109 - <xs:sequence>
110 - <xs:element name="OrderID">
111 - <xs:simpleType>
112 - <xs:restriction base="xs:string">
113 - <xs:maxLength value="200"/>
114 - </xs:restriction>
115 - </xs:simpleType>
116 - </xs:element>
117 - <xs:element name="OrderDate" type="xs:dateTime"/>
118 - <xs:element minOccurs="0" name="Order_Customer" type="Order_Customer"/>
119 - <xs:element name="Address" type="Address"/>
120 - <xs:element name="PartnerInfo_Order" type="PartnerInfo_Order"/>
121 - <xs:element name="OrderLine_Order" type="OrderLine_Order"/>
122 - </xs:sequence>
123 - </xs:complexType>
124 - <xs:complexType name="Order_Customer">
125 - <xs:sequence>
126 - <xs:element minOccurs="0" name="Customer" type="Customer"/>
127 - </xs:sequence>
128 - </xs:complexType>
129 - <xs:complexType name="Customer">
130 - <xs:sequence>
131 - <xs:element name="Name">
132 - <xs:simpleType>
133 - <xs:restriction base="xs:string">
134 - <xs:maxLength value="200"/>
135 - </xs:restriction>
136 - </xs:simpleType>
137 - </xs:element>
138 - <xs:element minOccurs="0" name="Contact_Customer" type="Contact_Customer"/>
139 - </xs:sequence>
140 - </xs:complexType>
141 - <xs:complexType name="Contact_Customer">
142 - <xs:sequence>
143 - <xs:element maxOccurs="unbounded"
144 - minOccurs="0"
145 - name="Contact"
146 - type="Contact"/>
147 - </xs:sequence>
148 - </xs:complexType>
149 - <xs:complexType name="Contact">
150 - <xs:sequence>
151 - <xs:element name="eMail">
152 - <xs:simpleType>
153 - <xs:restriction base="xs:string">
154 - <xs:maxLength value="200"/>
155 - </xs:restriction>
156 - </xs:simpleType>
157 - </xs:element>
158 - <xs:element minOccurs="0" name="Name">
159 - <xs:simpleType>
160 - <xs:restriction base="xs:string">
161 - <xs:maxLength value="200"/>
162 - </xs:restriction>
163 - </xs:simpleType>
164 - </xs:element>
165 - </xs:sequence>
166 - </xs:complexType>
167 - <xs:complexType name="Address">
168 - <xs:sequence>
169 - <xs:element name="Type" type="nonEmptyString"/>
170 - <xs:element name="Name" type="nonEmptyString"/>
171 - <xs:element name="Street" type="nonEmptyString"/>
172 - <xs:element name="PostalCode" type="nonEmptyString"/>
173 - <xs:element name="City" type="nonEmptyString"/>
174 - <xs:element name="Country" type="nonEmptyString"/>
175 - </xs:sequence>
176 - </xs:complexType>
177 - <xs:complexType name="PartnerInfo_Order">
178 - <xs:sequence>
179 - <xs:element maxOccurs="unbounded"
180 - minOccurs="0"
181 - name="PartnerInfo"
182 - type="PartnerInfo"/>
183 - </xs:sequence>
184 - </xs:complexType>
185 - <xs:complexType name="PartnerInfo">
186 - <xs:sequence>
187 - <xs:element name="UUID">
188 - <xs:simpleType>
189 - <xs:restriction base="xs:string">
190 - <xs:maxLength value="64"/>
191 - </xs:restriction>
192 - </xs:simpleType>
193 - </xs:element>
194 - </xs:sequence>
195 - </xs:complexType>
196 - <xs:complexType name="OrderLine_Order">
197 - <xs:sequence>
198 - <xs:element maxOccurs="unbounded"
199 - minOccurs="0"
200 - name="OrderLine"
201 - type="OrderLine"/>
202 - </xs:sequence>
203 - </xs:complexType>
204 - <xs:complexType name="OrderLine">
205 - <xs:sequence>
206 - <xs:element name="Description">
207 - <xs:simpleType>
208 - <xs:restriction base="xs:string">
209 - <xs:maxLength value="200"/>
210 - </xs:restriction>
211 - </xs:simpleType>
212 - </xs:element>
213 - <xs:element name="Quantity" type="xs:long"/>
214 - <xs:element name="Unit" type="Enum"/>
215 - <xs:element minOccurs="0" name="Weight" type="xs:double"/>
216 - </xs:sequence>
217 - </xs:complexType>
218 - <xs:simpleType name="nonEmptyString">
219 - <xs:restriction base="xs:string">
220 - <xs:minLength value="1"/>
221 - </xs:restriction>
222 - </xs:simpleType>
223 - <xs:simpleType name="Enum">
224 - <xs:restriction base="xs:string">
225 - <xs:enumeration value="COLLI"/>
226 - <xs:enumeration value="EURO"/>
227 - <xs:enumeration value="BOX"/>
228 - <xs:enumeration value="SACK"/>
229 - </xs:restriction>
230 - </xs:simpleType>
231 - <xs:element name="CreateOrder" type="CreateOrder"/>
232 -</xs:schema>
233 -{{/code}}
234 234  == 5. Key takeaways ==
235 235  
236 236  * The CDM holds all entities and attributes that are relevant within the context of your complete integration landscape.