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

897Yet Another Serialization question

Expand Messages
  • bill_rayburn@yahoo.com
    Oct 11, 2001
    • 0 Attachment
      Hi,

      I'm trying to generate this in the SOAP body:

      <newUser>
      <firstname>Joe</firstname>
      <lastname>Momma</lastname>
      <userid>joemomma</jmomma>
      <associatedDevices>
      <device>SEP222222222248</device>
      <device>SEP222222222249</device>
      </associatedDevices>
      </newUser>

      It's actually the parameter to a method call, which
      I'm omitting for brevity.

      I've gotten this far, but I want to know if I'm going
      down the right track:

      (SOAP::Data->name('newUser'))->type('ordered_hash' => [
      'firstname' => 'Joe',
      'lastname' => 'Momma',
      'userid' => 'joemomma',
      'associatedDevices' =>
      ['SEP222222222248', 'SEP222222222249'],
      ])

      The resulting body looks close, but I don't know how to specify the
      <device> tags.

      And why would I want to build the <newUser> element this way instead
      of using type('xml')? I could build methods on my objects that
      returned strings of xml -- what would be the downside to that?

      Thanks,
      Bill
    • Show all 5 messages in this topic