Skip to content

Commit f51c31a

Browse files
vukdjoricsimonovic86
authored andcommitted
Bugfix/importer xml (#324)
* aggregation fix and xml-s * test fix
1 parent d9fe18e commit f51c31a

File tree

9 files changed

+838
-7
lines changed

9 files changed

+838
-7
lines changed
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<epcis:EPCISDocument xmlns:epcis="urn:epcglobal:epcis:xsd:1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sbdh="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" schemaVersion="0" creationDate="2001-12-17T09:30:47Z" xsi:schemaLocation="urn:epcglobal:epcis:xsd:1 http://www.gs1si.org/BMS/epcis/1_2/EPCglobal-epcis-1_2.xsd">
3+
<EPCISHeader>
4+
<sbdh:StandardBusinessDocumentHeader>
5+
<sbdh:HeaderVersion>1.0</sbdh:HeaderVersion>
6+
<sbdh:Sender><!-- Mandatory -->
7+
<sbdh:Identifier Authority="OriginTrail">urn:ot:object:actor:id:Company_Green</sbdh:Identifier> <!-- Mandatory --> <!-- Creator PROVIDER_ID-->
8+
<sbdh:ContactInformation> <!-- Mandatory-->
9+
<sbdh:Contact>Abraham Smith</sbdh:Contact> <!-- Mandatory -->
10+
<sbdh:EmailAddress>abraham_Smith@green.com</sbdh:EmailAddress> <!-- Optional -->
11+
</sbdh:ContactInformation>
12+
</sbdh:Sender>
13+
<sbdh:Receiver> <!-- Mandatory -->
14+
<sbdh:Identifier Authority="OriginTrail">urn:ot:object:actor:id:Company_Pink</sbdh:Identifier> <!-- Mandatory-->
15+
<sbdh:ContactInformation> <!-- Mandatory-->
16+
<sbdh:Contact>Betty Johnson</sbdh:Contact> <!-- Mandatory -->
17+
<sbdh:EmailAddress>betty@pink.com</sbdh:EmailAddress> <!-- Optional -->
18+
</sbdh:ContactInformation>
19+
</sbdh:Receiver>
20+
<sbdh:DocumentIdentification> <!-- Mandatory-->
21+
<sbdh:Standard>GS1</sbdh:Standard>
22+
<sbdh:TypeVersion>V1.3</sbdh:TypeVersion> <!-- Document version-->
23+
<sbdh:InstanceIdentifier>100001</sbdh:InstanceIdentifier> <!-- UNIQUE IDENTIFIER OF DOCUMENT - PRIMARY KEY IN ERP -->
24+
<sbdh:Type>Shipment</sbdh:Type> <!-- DEFINED IN SCHEMA Example; order, invoice, debitCreditAdvice -->
25+
<sbdh:CreationDateAndTime>2018-01-01T00:31:52Z</sbdh:CreationDateAndTime> <!-- Optional -->
26+
</sbdh:DocumentIdentification>
27+
<sbdh:BusinessScope> <!-- Optional -->
28+
<sbdh:Scope>
29+
<sbdh:Type>BusinessProcess</sbdh:Type>
30+
<sbdh:InstanceIdentifier>Shipment/version2-251</sbdh:InstanceIdentifier>
31+
<sbdh:Identifier>EDI-Shipment</sbdh:Identifier>
32+
</sbdh:Scope>
33+
</sbdh:BusinessScope>
34+
</sbdh:StandardBusinessDocumentHeader>
35+
<extension>
36+
<EPCISMasterData>
37+
<VocabularyList>
38+
<Vocabulary type="urn:ot:object:actor">
39+
<VocabularyElementList>
40+
<VocabularyElement id="urn:ot:object:actor:id:Company_Green">
41+
<attribute id="urn:ot:object:actor:name">Green</attribute>
42+
<attribute id="urn:ot:object:actor:category">Company producer</attribute>
43+
<attribute id="urn:ot:object:actor:wallet">0xBbAaAd7BD40602B78C0649032D2532dEFa23A4C0</attribute>
44+
</VocabularyElement>
45+
<VocabularyElement id="urn:ot:object:actor:id:Company_Pink">
46+
<attribute id="urn:ot:object:actor:name">Pink</attribute>
47+
<attribute id="urn:ot:object:actor:category">Company</attribute>
48+
<attribute id="urn:ot:object:actor:wallet">0xFfDDAd7BD40602B78C0649032D2532dEFa23A4C0</attribute>
49+
</VocabularyElement>
50+
</VocabularyElementList>
51+
</Vocabulary>
52+
53+
<Vocabulary type="urn:ot:object:location">
54+
<VocabularyElementList>
55+
<VocabularyElement id="urn:epc:id:sgln:Building_Green">
56+
<attribute id="urn:ot:object:location:category">Building</attribute>
57+
<attribute id="urn:ot:object:location:description">Producer Warehouses</attribute>
58+
<children>
59+
<id>urn:epc:id:sgln:Building_Green_V1</id>
60+
<id>urn:epc:id:sgln:Building_Green_V2</id>
61+
</children>
62+
<extension>
63+
<attribute id="urn:ot:object:location:actorId">urn:ot:object:actor:id:Company_Green</attribute>
64+
</extension>
65+
</VocabularyElement>
66+
<VocabularyElement id="urn:epc:id:sgln:Building_Pink">
67+
<attribute id="urn:ot:object:location:category">Building</attribute>
68+
<attribute id="urn:ot:object:location:description">Pink distributor warehouse</attribute>
69+
<extension>
70+
<attribute id="urn:ot:object:location:actorId">urn:ot:object:actor:id:Company_Pink</attribute>
71+
</extension>
72+
</VocabularyElement>
73+
</VocabularyElementList>
74+
</Vocabulary>
75+
76+
<Vocabulary type="urn:ot:object:product">
77+
<VocabularyElementList>
78+
<VocabularyElement id="urn:ot:object:product:id:Product_1">
79+
<attribute id="urn:ot:object:product:category">Beverage</attribute>
80+
<attribute id="urn:ot:object:product:description">Wine Pallet</attribute>
81+
</VocabularyElement>
82+
</VocabularyElementList>
83+
</Vocabulary>
84+
85+
<Vocabulary type="urn:ot:object:batch">
86+
<VocabularyElementList>
87+
<VocabularyElement id="urn:epc:id:sgtin:Batch_1">
88+
<attribute id="urn:ot:object:product:batch:productId">urn:ot:object:product:id:Product_1</attribute>
89+
<attribute id="urn:ot:object:product:batch:productionDate">2017-31-12T00:01:54Z</attribute>
90+
<attribute id="urn:ot:object:product:batch:expirationDate">2020-31-12T00:01:54Z</attribute>
91+
</VocabularyElement>
92+
</VocabularyElementList>
93+
</Vocabulary>
94+
</VocabularyList>
95+
</EPCISMasterData>
96+
</extension>
97+
</EPCISHeader>
98+
<EPCISBody>
99+
<EventList>
100+
<ObjectEvent>
101+
<!-- Transport Shipment-->
102+
<eventTime>2018-01-01T01:00:00.000-04:00</eventTime> <!-- Mandatory-->
103+
<eventTimeZoneOffset>-04:00</eventTimeZoneOffset> <!-- Mandatory-->
104+
<epcList>
105+
<epc>urn:epc:id:sgtin:Batch_1</epc>
106+
</epcList>
107+
<action>OBSERVE</action> <!-- Mandatory-->
108+
<bizStep>urn:epcglobal:cbv:bizstep:shipping</bizStep> <!-- Optional -->
109+
<disposition>urn:epcglobal:cbv:disp:active</disposition> <!-- Optional -->
110+
<readPoint> <!-- Optional -->
111+
<id>urn:epc:id:sgln:Building_Green_V2</id>
112+
</readPoint>
113+
<bizLocation> <!-- Optional -->
114+
<id>urn:epc:id:sgln:Building_Green</id>
115+
</bizLocation>
116+
<extension>
117+
<quantityList> <!-- Optional -->
118+
<quantityElement>
119+
<epcClass>urn:epc:id:sgtin:Batch_1</epcClass>
120+
<quantity>10</quantity>
121+
<uom>KG</uom>
122+
</quantityElement>
123+
</quantityList>
124+
<extension>
125+
<documentId>1</documentId>
126+
<OTEventClass>urn:ot:event:Transport</OTEventClass>
127+
<OTEventClass>urn:ot:event:Ownership</OTEventClass>
128+
<OTEventType>Sales</OTEventType>
129+
<sourceList>
130+
<source type="urn:epcglobal:cbv:sdt:owning_party">urn:epc:id:sgln:Building_Green</source>
131+
</sourceList>
132+
<destinationList>
133+
<destination type="urn:epcglobal:cbv:sdt:owning_party">urn:epc:id:sgln:Building_Pink</destination>
134+
</destinationList>
135+
</extension>
136+
</extension>
137+
</ObjectEvent>
138+
</EventList>
139+
</EPCISBody>
140+
</epcis:EPCISDocument>
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<epcis:EPCISDocument xmlns:epcis="urn:epcglobal:epcis:xsd:1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sbdh="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" schemaVersion="0" creationDate="2001-12-17T09:30:47Z" xsi:schemaLocation="urn:epcglobal:epcis:xsd:1 http://www.gs1si.org/BMS/epcis/1_2/EPCglobal-epcis-1_2.xsd">
3+
<EPCISHeader>
4+
<sbdh:StandardBusinessDocumentHeader>
5+
<sbdh:HeaderVersion>1.0</sbdh:HeaderVersion>
6+
<sbdh:Sender> <!-- Mandatory -->
7+
<sbdh:Identifier Authority="OriginTrail">urn:ot:object:actor:id:Company_Pink</sbdh:Identifier> <!-- Mandatory-->
8+
<sbdh:ContactInformation> <!-- Mandatory-->
9+
<sbdh:Contact>Betty Johnson</sbdh:Contact> <!-- Mandatory -->
10+
<sbdh:EmailAddress>betty@pink.com</sbdh:EmailAddress> <!-- Optional -->
11+
</sbdh:ContactInformation>
12+
</sbdh:Sender>
13+
<sbdh:Receiver><!-- Mandatory -->
14+
<sbdh:Identifier Authority="OriginTrail">urn:ot:object:actor:id:Company_Green</sbdh:Identifier> <!-- Mandatory --> <!-- Creator PROVIDER_ID-->
15+
<sbdh:ContactInformation> <!-- Mandatory-->
16+
<sbdh:Contact>Abraham Smith</sbdh:Contact> <!-- Mandatory -->
17+
<sbdh:EmailAddress>abraham_Smith@green.com</sbdh:EmailAddress> <!-- Optional -->
18+
</sbdh:ContactInformation>
19+
</sbdh:Receiver>
20+
<sbdh:DocumentIdentification> <!-- Mandatory-->
21+
<sbdh:Standard>GS1</sbdh:Standard>
22+
<sbdh:TypeVersion>V1.3</sbdh:TypeVersion> <!-- Document version-->
23+
<sbdh:InstanceIdentifier>100002</sbdh:InstanceIdentifier> <!-- UNIQUE IDENTIFIER OF DOCUMENT - PRIMARY KEY IN ERP -->
24+
<sbdh:Type>Shipment</sbdh:Type> <!-- DEFINED IN SCHEMA Example; order, invoice, debitCreditAdvice -->
25+
<sbdh:CreationDateAndTime>2018-01-02T11:32:52Z</sbdh:CreationDateAndTime> <!-- Optional -->
26+
</sbdh:DocumentIdentification>
27+
<sbdh:BusinessScope> <!-- Optional -->
28+
<sbdh:Scope>
29+
<sbdh:Type>BusinessProcess</sbdh:Type>
30+
<sbdh:InstanceIdentifier>Receipt/version2-251</sbdh:InstanceIdentifier>
31+
<sbdh:Identifier>EDI-Receipt</sbdh:Identifier>
32+
</sbdh:Scope>
33+
</sbdh:BusinessScope>
34+
</sbdh:StandardBusinessDocumentHeader>
35+
<extension>
36+
<EPCISMasterData>
37+
<VocabularyList>
38+
<Vocabulary type="urn:ot:object:actor">
39+
<VocabularyElementList>
40+
<VocabularyElement id="urn:ot:object:actor:id:Company_Green">
41+
<attribute id="urn:ot:object:actor:name">Green</attribute>
42+
<attribute id="urn:ot:object:actor:category">Company producer</attribute>
43+
<attribute id="urn:ot:object:actor:wallet">0xBbAaAd7BD40602B78C0649032D2532dEFa23A4C0</attribute>
44+
</VocabularyElement>
45+
<VocabularyElement id="urn:ot:object:actor:id:Company_Pink">
46+
<attribute id="urn:ot:object:actor:name">Pink</attribute>
47+
<attribute id="urn:ot:object:actor:category">Company</attribute>
48+
<attribute id="urn:ot:object:actor:wallet">0xFfDDAd7BD40602B78C0649032D2532dEFa23A4C0</attribute>
49+
</VocabularyElement>
50+
</VocabularyElementList>
51+
</Vocabulary>
52+
53+
<Vocabulary type="urn:ot:object:location">
54+
<VocabularyElementList>
55+
<VocabularyElement id="urn:epc:id:sgln:Building_Green">
56+
<attribute id="urn:ot:object:location:category">Building</attribute>
57+
<attribute id="urn:ot:object:location:description">Producer Warehouses</attribute>
58+
<extension>
59+
<attribute id="urn:ot:object:location:actorId">urn:ot:object:actor:id:Company_Green</attribute>
60+
</extension>
61+
</VocabularyElement>
62+
<VocabularyElement id="urn:epc:id:sgln:Building_Pink">
63+
<attribute id="urn:ot:object:location:category">Building</attribute>
64+
<attribute id="urn:ot:object:location:description">Pink distributor warehouse</attribute>
65+
<children>
66+
<id>urn:epc:id:sgln:Building_Pink_V3</id>
67+
<id>urn:epc:id:sgln:Building_Pink_V4</id>
68+
</children>
69+
<extension>
70+
<attribute id="urn:ot:object:location:actorId">urn:ot:object:actor:id:Company_Pink</attribute>
71+
</extension>
72+
</VocabularyElement>
73+
</VocabularyElementList>
74+
</Vocabulary>
75+
76+
<Vocabulary type="urn:ot:object:product">
77+
<VocabularyElementList>
78+
<VocabularyElement id="urn:ot:object:product:id:Product_1">
79+
<attribute id="urn:ot:object:product:category">Beverage</attribute>
80+
<attribute id="urn:ot:object:product:description">Wine Pallet</attribute>
81+
</VocabularyElement>
82+
</VocabularyElementList>
83+
</Vocabulary>
84+
85+
<Vocabulary type="urn:ot:object:batch">
86+
<VocabularyElementList>
87+
<VocabularyElement id="urn:epc:id:sgtin:Batch_1">
88+
<attribute id="urn:ot:object:product:batch:productId">urn:ot:object:product:id:Product_1</attribute>
89+
<attribute id="urn:ot:object:product:batch:productionDate">2017-31-12T00:01:54Z</attribute>
90+
<attribute id="urn:ot:object:product:batch:expirationDate">2020-31-12T00:01:54Z</attribute>
91+
</VocabularyElement>
92+
</VocabularyElementList>
93+
</Vocabulary>
94+
</VocabularyList>
95+
</EPCISMasterData>
96+
</extension>
97+
</EPCISHeader>
98+
<EPCISBody>
99+
<EventList>
100+
<ObjectEvent>
101+
<!-- Transport Shipment-->
102+
<eventTime>2018-01-02T11:00:00.000-04:00</eventTime> <!-- Mandatory-->
103+
<eventTimeZoneOffset>-04:00</eventTimeZoneOffset> <!-- Mandatory-->
104+
<epcList>
105+
<epc>urn:epc:id:sgtin:Batch_1</epc>
106+
</epcList>
107+
<action>OBSERVE</action> <!-- Mandatory-->
108+
<bizStep>urn:epcglobal:cbv:bizstep:receiving</bizStep> <!-- Optional -->
109+
<disposition>urn:epcglobal:cbv:disp:active</disposition> <!-- Optional -->
110+
<readPoint> <!-- Optional -->
111+
<id>urn:epc:id:sgln:Building_Pink_V3</id>
112+
</readPoint>
113+
<bizLocation> <!-- Optional -->
114+
<id>urn:epc:id:sgln:Building_Pink</id>
115+
</bizLocation>
116+
<extension>
117+
<quantityList> <!-- Optional -->
118+
<quantityElement>
119+
<epcClass>urn:epc:id:sgtin:Batch_1</epcClass>
120+
<quantity>10</quantity>
121+
<uom>KG</uom>
122+
</quantityElement>
123+
</quantityList>
124+
<extension>
125+
<documentId>1</documentId>
126+
<OTEventClass>urn:ot:events:Transport</OTEventClass>
127+
<OTEventClass>urn:ot:events:Ownership</OTEventClass>
128+
<OTEventType>Sales</OTEventType>
129+
<sourceList>
130+
<source type="urn:epcglobal:cbv:sdt:owning_party">urn:epc:id:sgln:Building_Green</source>
131+
</sourceList>
132+
<destinationList>
133+
<destination type="urn:epcglobal:cbv:sdt:owning_party">urn:epc:id:sgln:Building_Pink</destination>
134+
</destinationList>
135+
</extension>
136+
</extension>
137+
</ObjectEvent>
138+
</EventList>
139+
</EPCISBody>
140+
</epcis:EPCISDocument>

0 commit comments

Comments
 (0)