[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WSDL2RPG and ISO 8601 Timestamp



Hi Jim,

I am afraid that I do not thoroughly understand the problem. I agree with you, that "ISO timestamp" is difficult to understand (for me too), because various systems use various representations for an ISO timestamp. ISO 8601 (Wikipedia) defines a timestamp like this: 2016-01-19T16:07:37+00:00

It contains a date portion, a time portion and (important!) it ends with a timezone. The IBM i timestamp does not have a timezone and hence it is somewhat like a "simple" timestamp. Maybe that UTC timestamp was corect, because that would match the MySQL definition of a timestamp.

At the end, a timestamp is always a composition of a date and time value, but almost each system uses a different string format.

https://en.wikipedia.org/wiki/ISO_8601#Truncated_representations
http://dev.mysql.com/doc/refman/5.7/en/datetime.html
https://msdn.microsoft.com/en-US/library/ms187819%28v=sql.120%29.aspx

What I do not understand is the problem with WSDL2RPG. The date time marshaller produces a timestamp value that matches the W3C notation like this:

Snippet from the WSDL:

    <complexContent>
     <extension base="tns2:CommonInputBean">
      <sequence>
       <element name="dataDocumento" nillable="true" type="xsd:dateTime"/>

Value, sent over the wire:

<dataDocumento xsi:type="xsd:dateTime">2016-01-22T08:32:52.911+01:00</dataDocumento>


So what is wrong with the dateTime marshaller?

Thomas.

-----Ursprüngliche Nachricht-----
Von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] Im Auftrag von Jim Franz
Gesendet: Freitag, 22. Januar 2016 06:17
An: ftpapi@xxxxxxxxxxxxxxxxxxxxxx
Betreff: WSDL2RPG and ISO 8601 Timestamp

New to wsdl2rpg, but I've got the first program talking to a web service on a Linux/Unix box using DB2 LUW.
Their "timestamp" is ccyy-mm-ddThh:mm:ss (optional subseconds) and according to them, matches both ISO 8601 standard and the W3C standards for XML Schema dateTime.
http://www.w3.org/TR/xmlschema-2/#dateTime

Also the xml editing for dateTime
http://www.w3schools.com/xml/schema_dtypes_date.asp

<xs:element name="startdate" type="xs:dateTime"/> <startdate>2002-05-30T09:00:00</startdate>


They point to our (Power I) timestamp ccyy-mm-dd-hh.mm.ss.msmsms and said it's "not ISO".
We call it ISO, but so far have lost the argument.
Had to alter the program to put the required timestamp parameter in their format (and that works).
I did replace the Marshaller stuff for dateTime with text fields (for now)

Is there a way to code this for what other systems call an ISO TimeStamp ?
And is there a difference between  "Timestamp" and a xsd "dateTime".
Searching the web it seems this can often be an issue.

Jim Franz
--
IMPORTANT NOTICE:
This email is confidential, may be legally privileged, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone else is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------