Loading ...
Sorry, an error occurred while loading the content.
 

XMLRPC::Lite server date encoding

Expand Messages
  • Michael P. Wilson
    Hya, I m stuck with a bit of a quandary I m having a difficult time finding my way out of. I ve a simple method returning a struct but I need to encode one
    Message 1 of 3 , Nov 21, 2003
      Hya,

      I'm stuck with a bit of a quandary I'm having a difficult time finding
      my way out of.

      I've a simple method returning a 'struct' but I need to encode one of
      the entries as an iso8601 but I've not the faintest idea how to go
      about it.

      I've dug through the docs and examples pretty thoroughly I think. But
      I must've missed something.

      Any pointers?

      TIA,

      - M

      -
      "When you are not practicing, remember, someone somewhere is
      practicing, and when you meet him he will win." - Ed Macauley
    • Duncan Cameron
      ... Neither SOAP::Lite not XMLRPC::Lite will do any formatting of values for you so you need to format the date/time yourself, something like
      Message 2 of 3 , Nov 22, 2003
        At 07:30:55 on 2003-11-22 Michael P. Wilson <mpwilson1969@...> wrote:

        >
        >Hya,
        >
        >I'm stuck with a bit of a quandary I'm having a difficult time finding
        >my way out of.
        >
        >I've a simple method returning a 'struct' but I need to encode one of
        >the entries as an iso8601 but I've not the faintest idea how to go
        >about it.
        >
        >I've dug through the docs and examples pretty thoroughly I think. But
        >I must've missed something.
        >
        >Any pointers?
        >
        Neither SOAP::Lite not XMLRPC::Lite will do any formatting of values
        for you so you need to format the date/time yourself, something like
        "1998-05-12T10:20Z"
        Something like this should help:

        SOAP::Data
        ->name("somename")
        ->type("xsd:dateTime")
        ->value("1998-05-12T10:20Z");

        Regards
        Duncan
      • Stephane Bortzmeyer
        On Sat, Nov 22, 2003 at 10:32:51AM +0000, Duncan Cameron wrote ... But HTTP::Date will do it. ... - value(time2isoz($mytime));
        Message 3 of 3 , Nov 25, 2003
          On Sat, Nov 22, 2003 at 10:32:51AM +0000,
          Duncan Cameron <duncan_cameron2002@...> wrote
          a message of 46 lines which said:

          > Neither SOAP::Lite not XMLRPC::Lite will do any formatting of values
          > for you

          But HTTP::Date will do it.

          > ->value("1998-05-12T10:20Z");

          ->value(time2isoz($mytime)); # Untested
        Your message has been successfully submitted and would be delivered to recipients shortly.