readpoint and bizLocation

50 views
Skip to first unread message

djbur...@gmail.com

unread,
Aug 10, 2015, 1:31:09 PM8/10/15
to fosstrak
Hi all,

I've found another peculiarity with Fosstrak, in that the order of the readpoint & bizlocation nodes in the xml file seems to matter - it shouldn't, as xml is not (necessarily) an ordered dataset. Unless this is something specified in the EPCIS standard?

The data file:

<?xml version="1.0" encoding="UTF-8"?>
<ns5:EPCISDocument xmlns:ns5="urn:epcglobal:epcis:xsd:1" schemaVersion="1.0" creationDate="2015-08-01T18:36:10+01:00">
  <EPCISBody>
    <EventList>
      <TransactionEvent>
        <eventTime>2014-07-13T22:21:30+01:00</eventTime>
        <eventTimeZoneOffset>+01:00</eventTimeZoneOffset>
        <bizTransactionList>
          <bizTransaction type="urn:gs1:epcisapp:rail:btt:passage">http://transaction.networkrail.co.uk/passage/00000000-000D-E060-0000-014731D16123</bizTransaction>
        </bizTransactionList>
        <epcList/>
        <action>ADD</action>
        <bizStep>urn:epcglobal:cbv:bizstep:transporting</bizStep>
        <disposition>urn:epcglobal:cbv:disp:in_transit</disposition>
        <bizLocation>
          <id>urn:epc:id:sgln:5053555.00000.0</id>
        </bizLocation>
        <readPoint>
          <id>urn:epc:id:sgln:5053555.00000.2</id>
        </readPoint>
        <rail:vehicle xmlns:rail="urn:gs1:epcisapp:rail">
[...]
        </rail:vehicle>
[...]
        <rail:vehicle xmlns:rail="urn:gs1:epcisapp:rail">
[...]
        </rail:vehicle>
        <rail:trainVehicleCount xmlns:rail="urn:gs1:epcisapp:rail">11</rail:trainVehicleCount>
        <rail:trainAxleCount xmlns:rail="urn:gs1:epcisapp:rail">44</rail:trainAxleCount>
      </TransactionEvent>
    </EventList>
  </EPCISBody>
</ns5:EPCISDocument>

returns an error 400, but swapping the readpoint/bizlocation nodes round is fine!

<?xml version="1.0" encoding="UTF-8"?>
<ns5:EPCISDocument xmlns:ns5="urn:epcglobal:epcis:xsd:1" schemaVersion="1.0" creationDate="2015-08-01T18:36:10+01:00">
  <EPCISBody>
    <EventList>
      <TransactionEvent>
        <eventTime>2014-07-13T22:21:30+01:00</eventTime>
        <eventTimeZoneOffset>+01:00</eventTimeZoneOffset>
        <bizTransactionList>
          <bizTransaction type="urn:gs1:epcisapp:rail:btt:passage">http://transaction.networkrail.co.uk/passage/00000000-000D-E060-0000-014731D16123</bizTransaction>
        </bizTransactionList>
        <epcList/>
        <action>ADD</action>
        <bizStep>urn:epcglobal:cbv:bizstep:transporting</bizStep>
        <disposition>urn:epcglobal:cbv:disp:in_transit</disposition>
        <readPoint>
          <id>urn:epc:id:sgln:5053555.00000.2</id>
        </readPoint>
        <bizLocation>
          <id>urn:epc:id:sgln:5053555.00000.0</id>
        </bizLocation>
        <rail:vehicle xmlns:rail="urn:gs1:epcisapp:rail">
[...]
        </rail:vehicle>
[...]
        <rail:vehicle xmlns:rail="urn:gs1:epcisapp:rail">
[...]
        </rail:vehicle>
        <rail:trainVehicleCount xmlns:rail="urn:gs1:epcisapp:rail">11</rail:trainVehicleCount>
        <rail:trainAxleCount xmlns:rail="urn:gs1:epcisapp:rail">44</rail:trainAxleCount>
      </TransactionEvent>
    </EventList>
  </EPCISBody>
</ns5:EPCISDocument>

Any ideas?

Thanks again...
Dave

marcantoine...@orange.com

unread,
Aug 10, 2015, 1:37:16 PM8/10/15
to foss...@googlegroups.com

Hi,

 

Actually, I think it comes from the EPCIS standard itself : the xsd files include <xsd:sequence> tags, which request for a specific order of XML tags.

 

Marc-Antoine

 

De : foss...@googlegroups.com [mailto:foss...@googlegroups.com] De la part de djbur...@gmail.com
Envoyé : lundi 10 août 2015 19:31
À : fosstrak
Objet : [fosstrak] readpoint and bizLocation

--
You received this message because you are subscribed to the Google Groups "fosstrak" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fosstrak+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.

This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.

djbur...@gmail.com

unread,
Aug 10, 2015, 1:45:17 PM8/10/15
to fosstrak
Thanks for the extremely rapid response (again!), Marc-Antoine!

You're absolutely correct - the standard has a sequence specified, so that the nodes should be in the order:

epcList
action
bizStep
disposition
readPoint
bizLocation
bizTransactionList
extension
##other

I'd just not spotted it before, only copying examples from others, which just happened to be in the right order...!

Regards,
Dave

djbur...@gmail.com

unread,
Aug 10, 2015, 5:13:51 PM8/10/15
to fosstrak
Actually, just noticed - the order I was using still isn't correct - biztransactionlist should come way down the list, not near the top, as it is in my working xml file!
D
Reply all
Reply to author
Forward
0 new messages