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

Re: [soaplite] Re: null return values

Expand Messages
  • Brutsch, Michael
    ... No, that would be fine. I am just ignoring the warnings, at this point. Everything else is working great! SOAP::Lite is most excellent! Thanks, Michael
    Message 1 of 5 , Apr 12, 2001
    • 0 Attachment
      Paul Kulchenko wrote:

      > Hi, Michael!
      >
      > you're absolutely right. All simple types defined in spec will return
      > undef value if transferred as <name ...../> or <name ....></name>. As
      > far as I can understand it makes difference only for string (empty
      > string becames undef), because for all other values empty string is
      > not allowed value anyway. Since null/undef values are marked as such
      > on wire or can be completely omitted I may convert undef string
      > values back to empty strings in deserializer. Any objections?

      No, that would be fine. I am just ignoring the warnings, at this point.
      Everything else is working great! SOAP::Lite is most excellent!

      Thanks,
      Michael

      >
      > Best wishes, Paul.
      >
      > --- mbrutsch@... wrote:
      >
      >> Paul,
      >>
      >> I wish to return an empty string, as in
      >>
      >> $a = "";
      >> print $a;
      >>
      >> which returns no error with -w, but does with SOAP::Lite (perhaps
      >> you
      >> are treating an empty string as undef?)
      >>
      >>
      >>
      >>> Hi, Michael!
      >>>
      >>> Because it's REAL null (undef) value. if you do
      >>> $a = undef;
      >>> print $a;
      >>>
      >>> you'll also get warning on this.
      >>>
      >>> in our situation it could be
      >>> $a = $soap->something->result; # returns undef
      >>> print $a;
      >>>
      >>> and you'll get warning again with -w.
      >>>
      >>> What did you expect to get? I tried to reproduce as much Perlish
      >>> behavior as possible :)
      >>>
      >>> Best wishes, Paul.
      >>>
      >>> --- mbrutsch@i... wrote:
      >>>
      >>>> Whenever I return a null from a method call, I get the error
      >>>
      >> "Use
      >>
      >>>> of
      >>>> uninitialized value". It works fine when I return anything
      >>>
      >> else.
      >>
    Your message has been successfully submitted and would be delivered to recipients shortly.