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

5058Re: [soaplite] Weird serialization when passing sub elements to SOAP::Data->value?

Expand Messages
  • Scott Jackson
    Dec 20, 2005
    • 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
      >
      >
      >
      >
      >
      >
      >
    • Show all 3 messages in this topic