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

3463Re: SOAP::Lite and dates

Expand Messages
  • Stephane Bortzmeyer
    Apr 2 5:52 AM
    • 0 Attachment
      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'

      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><number
      xsi:type="xsd:string">NIC000000500893</number></s-gensym23></namesp5: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 :-}
    • Show all 12 messages in this topic