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

Weird serialization when passing sub elements to SOAP::Data->value?

Expand Messages
  • Jesse Brown
    This call... $client- call( check_login = SOAP::Data- name( auth = SOAP::Data- name( email ,= testemail ), SOAP::Data- name( pword ,= testpassword ) )
    Message 1 of 3 , Dec 20, 2005
    View Source
    • 0 Attachment
      This call...

      $client->call('check_login' =>
      SOAP::Data->name('auth' =>
      \SOAP::Data->name('email',=>'testemail'),
      \SOAP::Data->name('pword',=>'testpassword')
      )
      )->result;

      Generates (cleaned up a bit):
      <auth>
      <email xsi:type="xsd:string">testemail</email>
      </auth>
      <auth>
      <pword xsi:type="xsd:string">testpassword</pword>
      </auth>

      When what I want is:
      <auth>
      <email>testemail</email>
      <pword>testpassword</pword>
      </auth>

      (notice the two <auth> tags?!)

      The difference on the server side is dramatic of course. With what is
      happening, I get two hashrefs, one containing 'email' and one containing
      'pword'. When I pass in the raw XML, I get what I should get, which is a
      hashref containing 'email' and 'pword'.

      I've tried passing the parameters in as hashrefs, listrefs, etc but so
      far no luck. This really doesn't seem like proper behaviour! Help!

      (I'm using SOAP::Lite 0.65_6)








      -----------------------------------------------------------
      This message may contain confidential and/or privileged
      information. This information is intended to be read only
      by the individual or entity to whom it is addressed. If
      you are not the intended recipient, you are on notice that
      any review, disclosure, copying, distribution or use of
      the contents of this message is strictly prohibited. If
      you have received this message in error, please notify the
      sender immediately and delete or destroy any copy of this
      message.
    • Scott Jackson
      Jesse, I may be naive here, but at first glance it looks unusual for you to have both a comma , and a pair operator = in a hash element such as:
      Message 2 of 3 , Dec 20, 2005
      View Source
      • 0 Attachment
        Jesse,

        I may be naive here, but at first glance it looks unusual for you to
        have both a comma "," and a pair operator "=>" in a hash element such
        as:
        'email',=>'testemail'

        I would think you would want one or the other such as:

        'email', 'testemail'

        or probably more appropriately

        'email' =>'testemail'
        .

        Scott

        On Tue, 2005-12-20 at 10:36 -0800, Jesse Brown wrote:
        > This call...
        >
        > $client->call('check_login' =>
        > SOAP::Data->name('auth' =>
        > \SOAP::Data->name('email',=>'testemail'),
        > \SOAP::Data->name('pword',=>'testpassword')
        > )
        > )->result;
        >
        > Generates (cleaned up a bit):
        > <auth>
        > <email xsi:type="xsd:string">testemail</email>
        > </auth>
        > <auth>
        > <pword xsi:type="xsd:string">testpassword</pword>
        > </auth>
        >
        > When what I want is:
        > <auth>
        > <email>testemail</email>
        > <pword>testpassword</pword>
        > </auth>
        >
        > (notice the two <auth> tags?!)
        >
        > The difference on the server side is dramatic of course. With what is
        > happening, I get two hashrefs, one containing 'email' and one containing
        > 'pword'. When I pass in the raw XML, I get what I should get, which is a
        > hashref containing 'email' and 'pword'.
        >
        > I've tried passing the parameters in as hashrefs, listrefs, etc but so
        > far no luck. This really doesn't seem like proper behaviour! Help!
        >
        > (I'm using SOAP::Lite 0.65_6)
        >
        >
        >
        >
        >
        >
        >
        >
        > -----------------------------------------------------------
        > This message may contain confidential and/or privileged
        > information. This information is intended to be read only
        > by the individual or entity to whom it is addressed. If
        > you are not the intended recipient, you are on notice that
        > any review, disclosure, copying, distribution or use of
        > the contents of this message is strictly prohibited. If
        > you have received this message in error, please notify the
        > sender immediately and delete or destroy any copy of this
        > message.
        >
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
        >
        >
        >
      • Jesse Brown
        It looks weird (was a typo), but removing it makes zero difference. (I tried!) The data generated is identical. ... This message may contain confidential
        Message 3 of 3 , Dec 20, 2005
        View Source
        • 0 Attachment
          It looks weird (was a typo), but removing it makes zero difference. (I
          tried!)

          The data generated is identical.


          On Tue, 2005-12-20 at 12:37 -0700, Scott Jackson wrote:
          > Jesse,
          >
          > I may be naive here, but at first glance it looks unusual for you to
          > have both a comma "," and a pair operator "=>" in a hash element such
          > as:
          > 'email',=>'testemail'
          >
          > I would think you would want one or the other such as:
          >
          > 'email', 'testemail'
          >
          > or probably more appropriately
          >
          > 'email' =>'testemail'
          > .
          >
          > Scott
          >
          > On Tue, 2005-12-20 at 10:36 -0800, Jesse Brown wrote:
          > > This call...
          > >
          > > $client->call('check_login' =>
          > > SOAP::Data->name('auth' =>
          > > \SOAP::Data->name('email',=>'testemail'),
          > > \SOAP::Data->name('pword',=>'testpassword')
          > > )
          > > )->result;
          > >
          > > Generates (cleaned up a bit):
          > > <auth>
          > > <email xsi:type="xsd:string">testemail</email>
          > > </auth>
          > > <auth>
          > > <pword xsi:type="xsd:string">testpassword</pword>
          > > </auth>
          > >
          > > When what I want is:
          > > <auth>
          > > <email>testemail</email>
          > > <pword>testpassword</pword>
          > > </auth>
          > >
          > > (notice the two <auth> tags?!)
          > >
          > > The difference on the server side is dramatic of course. With what is
          > > happening, I get two hashrefs, one containing 'email' and one containing
          > > 'pword'. When I pass in the raw XML, I get what I should get, which is a
          > > hashref containing 'email' and 'pword'.
          > >
          > > I've tried passing the parameters in as hashrefs, listrefs, etc but so
          > > far no luck. This really doesn't seem like proper behaviour! Help!
          > >
          > > (I'm using SOAP::Lite 0.65_6)
          > >
          > >
          > >
          > >
          > >
          > >
          > >
          > >
          > > -----------------------------------------------------------
          > > This message may contain confidential and/or privileged
          > > information. This information is intended to be read only
          > > by the individual or entity to whom it is addressed. If
          > > you are not the intended recipient, you are on notice that
          > > any review, disclosure, copying, distribution or use of
          > > the contents of this message is strictly prohibited. If
          > > you have received this message in error, please notify the
          > > sender immediately and delete or destroy any copy of this
          > > message.
          > >
          > >
          > >
          > >
          > >
          > > Yahoo! Groups Links
          > >
          > >
          > >
          > >
          > >
          > >
          > >
          >






          -----------------------------------------------------------
          This message may contain confidential and/or privileged
          information. This information is intended to be read only
          by the individual or entity to whom it is addressed. If
          you are not the intended recipient, you are on notice that
          any review, disclosure, copying, distribution or use of
          the contents of this message is strictly prohibited. If
          you have received this message in error, please notify the
          sender immediately and delete or destroy any copy of this
          message.
        Your message has been successfully submitted and would be delivered to recipients shortly.