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

3466Re: [soaplite] Re: SOAP::Lite and dates

Expand Messages
  • Byrne Reese
    Apr 2, 2004
    • 0 Attachment
      I have been lagging in packaging the latest set of updates for
      SOAP::Lite because they are all tied into WSDL2Perl, but in the next
      release, the 2001 schema becomes default, and the type detector was
      upgraded to detect primitives more reliably and consistently.

      SOAP::Lite will also have integrated with it, a datetime formatter, so
      that such values can be generated more easily.

      I know that doesn't help you now, but know that the feature is coming.

      Duncan Cameron wrote:

      > At 13:52:48 on 02-04-2004 Stephane Bortzmeyer <bortzmeyer@...>
      > wrote:
      >
      > >On Fri, Apr 02, 2004 at 12:58:52PM +0200,
      > > Stephane Bortzmeyer <bortzmeyer@...> wrote
      > > a message of 41 lines which said:
      > >
      > >> In CPAN, I've found a SOAP::DateTime. Is it the only solution?
      > >
      > >Using the above module to format the date and
      > >SOAP::Data->type('xsd:datetime' => XXX) to tag it properly, I can
      > >>send
      > >what seems to be proper SOAP elements.
      > >
      > >Now, how can I deserialize them in Perl? The client, also written
      > >>in
      > >SOAP::Lite, says:
      > >
      > >SOAP::Deserializer::deserialize: ()
      > >SOAP::Parser::decode: ()
      > >Unrecognized type '{http://www.w3.org/1999/XMLSchema}datetime'
      > <http://www.w3.org/1999/XMLSchema%7Ddatetime%27>
      > >
      > >while the SOAP answer is:
      > >
      > ><?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
      > >>xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      > >>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
      > >>xmlns:namesp6="http://xml.apache.org/xml-soap"
      > >>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      > >>xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
      > >>xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><namesp5
      > >>:status_ticketResponse
      > >>xmlns:namesp5="http://nic.fr/Ticket"><s-gensym23
      > >>xsi:type="namesp6:SOAPStruct"><auth
      > >>xsi:type="xsd:string">A2950FFEAAFBAD17</auth><state
      > >>xsi:type="xsd:string">DNS Non Pret</state><operation
      > >>xsi:type="xsd:string">Creation</operation><form
      > >>xsi:type="xsd:int">301988</form><domain
      > >>xsi:type="xsd:string">logan2004.fr</domain><creation_date
      > >>xsi:type="xsd:datetime">2003-06-10T12:59:00</creation_date><seed
      > >>xsi:type="xsd:int">442724</seed><remark xsi:type="xsd:string">Nouvel
      > >>Etat: DNS Non Pret
      > ></remark><modification_date
      > >xsi:type="xsd:datetime">2003-07-10T10:50:00</modification_date><num
      > >>ber
      > >xsi:type="xsd:string">NIC000000500893</number></s-gensym23></namesp
      > >>5:status_ticketResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
      > >
      > >The question "How to deserialize datetimes?" seem to come up often
      > >>on
      > >that list but not the answer :-}
      >
      > The type is dateTime not datetime and your server needs to specify the
      > 2001 namespace not 1999, i.e.
      > xmlns:xsd="http://www.w3.org/2001/XMLSchema". The element will then be
      > deserialised simply as the string value. If you want a Perl time value
      > then you will have to do the conversion yourself.
      >
      > Regards
      > Duncan
      >
      >
      >
      > ------------------------------------------------------------------------
      > *Yahoo! Groups Links*
      >
      > * To visit your group on the web, go to:
      > http://groups.yahoo.com/group/soaplite/
      >
      > * To unsubscribe from this group, send an email to:
      > soaplite-unsubscribe@yahoogroups.com
      > <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
      >
      > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
      > Service <http://docs.yahoo.com/info/terms/>.
      >
      >
    • Show all 12 messages in this topic