Extension values in posted data

17 views
Skip to first unread message

djbur...@gmail.com

unread,
Jul 21, 2015, 9:17:54 AM7/21/15
to foss...@googlegroups.com
Hi all,

Another question.

I've created an XML file according to the GS1 EPCIS for Rail Vehicle Visibility Application Standard ( http://www.gs1.org/epcis/rail/latest ), including rail: extension values as follows:

      <TransactionEvent>
[...]
        <rail:vehicle xmlns:rail="urn:gs1:epcisapp:rail">
          <vehiclePosition>1</vehiclePosition>
          <vehicleUniquelyIdentified>true</vehicleUniquelyIdentified>
          <vehicleMasterGIAI>urn:epc:id:giai:5053555.9957000602095</vehicleMasterGIAI>
        </rail:vehicle>
[...]
      </TransactionEvent>

This seems to accord with the sample in on p43 of the Application Standard.

I http POST this to Fosstrak, which seems to work (i.e. no error is returned and the data appears in the database). However, when I query for this event, I get back xml containing:

[...]
                  <rail:vehicle xmlns:rail="urn:gs1:epcisapp:rail">1
          true
          urn:epc:id:giai:5053555.9957000602095</rail:vehicle>
[...]

i.e. the extension names have been stripped.

The table event_transactionevent_extensions contains the following:

# id, event_id, fieldname, prefix, intValue, floatValue, dateValue, strValue
2360418, 277164, urn:gs1:epcisapp:rail#vehicle, rail, , , ,
          1
          true
          urn:epc:id:giai:5053555.9957000602095

So it looks like the problem is when the data gets added to the table in the first place, not during the query.

The epcis-repository.log file has lots of lines such as "[org.fosstrak.epcis.repository.model.EventFieldExtension:87] -     value of extension is of type String."

The relevant code here appears to test for integer, float, date types, in that order, and then default to string if they all fail. It doesn't seem to allow for complex types (i.e. xml as required by the Application Standard).

Is there something I'm doing wrong? Or is this a problem with the Fosstrak implementation?

Thanks!
Dave

marcantoine...@orange.com

unread,
Jul 21, 2015, 9:22:58 AM7/21/15
to foss...@googlegroups.com

Hi David,

 

This is exactly the Fosstrak limitation I was talking about in my previous mail:

In Fosstrak implementation, only simple attributes are supported for values (string, integer, etc –not XML or JSON for instance). There is no support for complex extensions yet.

 

You did nothing wrong. Your XML tags will be stripped with the current implementation.

 

Of course, if anyone is interested in implementing this, he will be welcome!

 

Marc-Antoine

 

De : foss...@googlegroups.com [mailto:foss...@googlegroups.com] De la part de djbur...@gmail.com
Envoyé : mardi 21 juillet 2015 15:18
À : foss...@googlegroups.com
Objet : [fosstrak] Extension values in posted data

--
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,
Jul 21, 2015, 11:10:58 AM7/21/15
to foss...@googlegroups.com
Ah - I read that comment in your previous message in the context just of master data, not everything Fosstrak does with extensions!

Yes, it would be good to get this added in the next version. Unfortunately, I do not have the tools to do development of Fosstrak. One needs all sorts of rights opened up to run maven, eclipse, github, etc - none of which I have, as this PC is far too locked down! I can do simple java coding & compilation (npp & jdk), but not work major integrated team built projects:-(

So that means that Fosstrak, as it stands, is not really suitable for use with the GS1 EPCIS for Rail Vehicle Visibility Application Standard? any suggestions for alternatives? (not really the place to ask I know:-) ) Anyone done much with Oliot, mentioned in a previous thread?

Thanks again anyway, Marc-Antoine.

Regards,
Dave
Reply all
Reply to author
Forward
0 new messages