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

1014Re: [soaplite] Problem serializing Map to Java Server

Expand Messages
  • Paul Kulchenko
    Nov 19, 2001
      Hi, Simon!

      > Java Server side, it expects a string for the key. How can I
      > serialize the key as a string when an interger string is given?
      Unfortunately there is no easy way to do that. That's because key in
      hash will always be stringified in Perl, so you can't use SOAP::Data
      to specify type, name or any other metainfo. I will probably extend
      map type to accept key => value pairs from arrays, so in addition to:

      SOAP::Data->type(map => {key => 'value'})

      you'll be able to write

      SOAP::Data->type(map => ['key' => 'value'])

      and specify any metainfo for 'key'.

      Right now you can create type 'HashMap' for example and write custom
      serializer that will serialize it as 'map' on wire. Let me know if
      you'd like to go this way and need help in writing as_HashMap method.

      Best wishes, Paul.

      --- eat_lemon@... wrote:
      > Consider the following code:
      >
      > %maps = ("123", "3");
      > $map = SOAP::Data->type("map")
      > ->value(\%maps);
      >
      > Now, this will serialize the key "123" as an integer, however, on
      > the
      > Java Server side, it expects a string for the key. How can I
      > serialize the key as a string when an interger string is given?
      >
      > Any help is greatly appreciated!
      >
      > Thanks,
      >
      > Simon
      >
      >
      >
      > ------------------------ 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!?
      Find the one for you at Yahoo! Personals
      http://personals.yahoo.com
    • Show all 3 messages in this topic