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

Re: Re: Constructing a response as a collection of elements

Expand Messages
  • Eric Amick
    ... I assume you meant return (SOAP::Data- name(messageversion = 1.0 ), SOAP::Data- name(sequence = 123456 ), SOAP::Data- name(status = 0 )) ; or is list
    Message 1 of 7 , Aug 29, 2004
    • 0 Attachment
      On 29 Aug 2004 10:46:19 -0000, you wrote:

      >If you return a list then each entry will be sent immediately beneath
      >the ConnectResponse element:
      >
      >return
      > SOAP::Data->name(messageversion => '1.0'),
      > SOAP::Data->name(sequence => '123456'),
      > SOAP::Data->name(status => '0')
      >;

      I assume you meant

      return
      (SOAP::Data->name(messageversion => '1.0'),
      SOAP::Data->name(sequence => '123456'),
      SOAP::Data->name(status => '0'))
      ;

      or is list context forced somehow?

      --
      Eric Amick
      Columbia, MD
    • Duncan Cameron
      ... I am not sure that context is the issue, rather the list is constructed first. The context of the call then dictates whether the list is returned in scalar
      Message 2 of 7 , Aug 29, 2004
      • 0 Attachment
        On 2004-08-29 at 13:55:09 Eric Amick <eric-amick@...> wrote:

        >
        >On 29 Aug 2004 10:46:19 -0000, you wrote:
        >
        >>If you return a list then each entry will be sent immediately beneath
        >>the ConnectResponse element:
        >>
        >>return
        >> SOAP::Data->name(messageversion => '1.0'),
        >> SOAP::Data->name(sequence => '123456'),
        >> SOAP::Data->name(status => '0')
        >>;
        >
        >I assume you meant
        >
        >return
        > (SOAP::Data->name(messageversion => '1.0'),
        > SOAP::Data->name(sequence => '123456'),
        > SOAP::Data->name(status => '0'))
        >;
        >
        >or is list context forced somehow?

        I am not sure that context is the issue, rather the list is constructed first. The context of the call then dictates whether the list is returned in scalar or list context. SOAP::Lite has to call the method in list context as it does not know beforehand what is going to be returned.

        Having said that, I agree that it is clearer to put the list in brackets!

        Regards
        Duncan
      • mitchbetterhavemybunny
        ... Perfect. Thank you, gentlemen, for sharing your insight. Scott Franklin
        Message 3 of 7 , Aug 30, 2004
        • 0 Attachment
          --- In soaplite@yahoogroups.com, Eric Amick <eric-amick@c...> wrote:
          > >If you return a list then each entry will be sent immediately beneath
          > >the ConnectResponse element:
          > >
          > >return
          > > SOAP::Data->name(messageversion => '1.0'),
          > > SOAP::Data->name(sequence => '123456'),
          > > SOAP::Data->name(status => '0')
          > >;
          >

          Perfect. Thank you, gentlemen, for sharing your insight.

          Scott Franklin
        Your message has been successfully submitted and would be delivered to recipients shortly.