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

Strange serialization behaviour when sending a hash

Expand Messages
  • Marcello Teodori
    When using SOAP encoding with an HASH value that does not contain any keys that are integers, the serialization returns a SOAP-Struct instead of a xmlsoap:map
    Message 1 of 2 , Jul 30, 2001
      When using SOAP encoding with an HASH value that does not contain any
      keys that are integers, the serialization returns a SOAP-Struct
      instead of a xmlsoap:map as defined by Apache SOAP.
      This behaviour creates problems when working with:
      - SOAP::Lite server
      - Apache SOAP client
      The solution is to explicitly set the type in SOAP::Data to map, but
      I would prefer a consistent behaviour in both cases (with and without
      an integer as key)
      Marcello Teodori
    • Paul Kulchenko
      Hi, Marcello! ... That is consistent. Map is not a standard type, but it s supported by SOAP::Lite and ApacheSOAP. More toolkits may support it in a future,
      Message 2 of 2 , Jul 30, 2001
        Hi, Marcello!

        > The solution is to explicitly set the type in SOAP::Data to map,
        > but I would prefer a consistent behaviour in both cases (with and
        > without an integer as key)
        That is consistent. Map is not a standard type, but it's supported by
        SOAP::Lite and ApacheSOAP. More toolkits may support it in a future,
        but it's still non-standard. SOAP::Lite uses Map only if hash can't
        be encoded in a usual way (keys have some non-XMLizible values, like
        numbers, strings with zeroes or something like that). If you want to
        generate Maps in all case, than you need to specify this type
        explicitly.

        Best wishes, Paul.

        --- Marcello Teodori <m_teodori@...> wrote:
        > When using SOAP encoding with an HASH value that does not contain
        > any
        > keys that are integers, the serialization returns a SOAP-Struct
        > instead of a xmlsoap:map as defined by Apache SOAP.
        > This behaviour creates problems when working with:
        > - SOAP::Lite server
        > - Apache SOAP client
        > The solution is to explicitly set the type in SOAP::Data to map,
        > but
        > I would prefer a consistent behaviour in both cases (with and
        > without
        > an integer as key)
        > Marcello Teodori
        >
        >
        > ------------------------ Yahoo! Groups Sponsor
        >
        > To unsubscribe from this group, send an email to:
        > soaplite-unsubscribe@yahoogroups.com
        >
        >
        >
        > Your use of Yahoo! Groups is subject to
        > http://docs.yahoo.com/info/terms/
        >
        >


        __________________________________________________
        Do You Yahoo!?
        Make international calls for as low as $.04/minute with Yahoo! Messenger
        http://phonecard.yahoo.com/
      Your message has been successfully submitted and would be delivered to recipients shortly.