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

RE: Marshaller_toDateTime parameters options



   Tomas,



   At least we are one step further, because now you got an error when
   unmarshalling a value. That means, that you received a response from
   the server!



   Please enable the debug log, call the web service again and eventually
   send the log to me. For now I have no idea how to make my test web
   service not to add the timezone portion, which makes it difficult to
   test. Also I need to know the exact data type that you received from
   the server.



   At the moment I assume that it is a time value that causes the error,
   because the XML time format (e.g. 16:29:59) does not match the ISO
   format, that %time() expects. Hence it might be the
   UnMarshaller_toTime() that fails working when no timezone information
   is available:



       other;
          time = %time(inTimeShort.value);     // no time zone inf.
   available
       endsl;

   On the other hand that cannot be the truth, because the unmarshaller
   calls parseXmlTime() to convert the time to ISO format.



   The UnMarshaller_toDate() unmarshaller should work just fine, because
   the XML date format (e.g. 2014-11-29) equals the ISO format:



       other;
          date = %date(inDate.value);    // no time zone inf. available
       endsl;

   The same should be true for UnMarshaller_toDateTime(), because it calls
   adjustTimestamp(), if no timezone is present:



       other;
          timestamp = adjustTimestamp(inTimestamp); // no time zone inf.
   available
       endsl;

   I am stuck. I cannot reproduce the problem with the debugger, but the
   debug log should tell us the truth.



   Regards,



   Thomas.



   > Tomas Martinez <Tomasm@xxxxxxxxxxxxxxxxxx> hat am 26. November 2014
   um 22:28 geschrieben:
   >
   >
   > Thomas,
   > Thanks for the detail instructions.
   > I made the changes and everything compiled properly. But it looks
   like there is still something missing because it doesn't like the fact
   the that TimeZone is not there.
   >
   > We keep getting this error:
   >
   > WSDL2RPG: USR5023: Failed unmarshalling value '*N' of field '*N'.
   > Cause . . . . . : The following error message prevented the value of
   field '*N' from being retrieved from XPath '*N/*N'. Message text . :
   Time zone indicator * does not match one of the expected value of: Z, -
   or +
   >
   > Thanks,
   >
   > Tomas Martinez
   > -----Original Message-----
   > From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
   [mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Thomas
   Raddatz
   > Sent: Tuesday, November 25, 2014 8:44 AM
   > To: HTTPAPI and FTPAPI Projects
   > Subject: Re: Marshaller_toDateTime parameters options
   >
   > Tomas,
   >
   > Today there is no option to restrict the time zone portion from being
   added to date and time values. But it is not that difficult to add it.
   >
   > On my development system I changed the following source members:
   >
   > TYPES_H:
   > --------
   >
   > Added:
   > D WSDL_NO_TIMEZONE...
   > D C '*NONE'
   >
   > WSDL2R98:
   > ---------
   >
   > Changed Marshaller_toDate(), added %trimR):
   > B01 if (%parms() >= p_timeZone);
   > value = value + %trimR(getXmlTimeZone(i_timeZone));
   > X01 else;
   > value = value + %trimR(getXmlTimeZone(WSDL_LOCAL_TIMEZONE));
   > E01 endif;
   >
   > Changed Marshaller_toTime(), added %trimR):
   > B01 if (%parms() >= p_timeZone);
   > value = value + %trimR(getXmlTimeZone(i_timeZone));
   > X01 else;
   > value = value + %trimR(getXmlTimeZone(WSDL_LOCAL_TIMEZONE));
   > E01 endif;
   >
   > Changed getXmlTimeZone(), replaced first if/endif block:
   > B01 select;
   > X01 when (i_timeZone = WSDL_NO_TIMEZONE);
   > return '';
   > X01 when (i_timeZone = WSDL_LOCAL_TIMEZONE);
   > timeZone = f_rtvSysval_char('QUTCOFFSET');
   > X01 other;
   > timeZone = i_timeZone;
   > E01 endsl;
   >
   >
   > With these changes in place you can add WSDL_NO_TIMEZONE to the
   procedure calls of your marshaller procedures like this:
   >
   > Before:
   >
   > '<tns1:date>' +
   > Marshaller_toDate(
   > i_impl_echoDateTime.aDateTimeStructure.date
   > ) +
   > '</tns1:date>' +
   >
   > After:
   >
   > '<tns1:date>' +
   > Marshaller_toDate(
   > i_impl_echoDateTime.aDateTimeStructure.date
   > : WSDL_NO_TIMEZONE
   > ) +
   > '</tns1:date>' +
   >
   > I am going to make my changes available with 1.16beta7 soon. But of
   course you can modify your copy of WSDL2RPG right now.
   >
   > Regards,
   >
   > Thomas.
   >
   > Am 25.11.2014 01:45, schrieb Tomas Martinez:
   > > Hi,
   > >
   > > Marshaller_toDateTime() returns the Time zone if not provided, is
   there
   > > a way have it NOT return the time zone?
   > >
   > >
   > > The web service we are connecting to is having problems processing
   the
   > > time stamp that contains the Time Zone for certain fields and have
   > > asked us to stop sending it.
   > >
   > >
   > > Thanks you in advance for your help.
   > >
   > > Tomas T. Martinez | IT Department |Senior Systems Analyst
   > > City Furniture | 6701 N Hiatus Road | Tamarac, FL 33321
   > > | [1]www.cityfurniture.com
   > >
   > > References
   > >
   > > 1. http://www.cityfurniture.com/
   > >
   > >
   > >
   > >
   ----------------------------------------------------------------------
   > > - This is the FTPAPI mailing list. To unsubscribe, please go to:
   > > http://www.scottklement.com/mailman/listinfo/ftpapi
   > >
   ----------------------------------------------------------------------
   > > -
   > >
   >
   -----------------------------------------------------------------------
   > This is the FTPAPI mailing list. To unsubscribe, please go to:
   > http://www.scottklement.com/mailman/listinfo/ftpapi
   >
   -----------------------------------------------------------------------
   >
   -----------------------------------------------------------------------
   > This is the FTPAPI mailing list. To unsubscribe, please go to:
   > http://www.scottklement.com/mailman/listinfo/ftpapi
   >
   -----------------------------------------------------------------------
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------