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

5464Re: [soaplite] type not honored in complex request doc

Expand Messages
  • Eric Bridger
    Jun 30, 2006
      SOAP::Lite does not ordinarily try to autotype complex object nodes only
      the leaves of your document tree. So remove the ->type('') from <Top>
      and <Level1> but keep it on <Key1> and <Key2>.

      My guess is that by adding ->type() to a node SL then attempts to
      autotype what it usually does not.

      Eric


      On Fri, 2006-06-30 at 10:46, Craig Dunigan wrote:
      > Hi,
      >
      > I'm writing a SOAP::Lite v0.60 client for a GeoTrust SOAP v1.1 doc/lit
      > service that requires a complex request doc. I'm using v0.60 because
      > I would rather not figure out how to return the namespace to
      > "SOAP-ENV:" since later versions use "Soap:". I can nest all the
      > elements properly (although the existing docs *are* a little
      > misleading), but the service blows up with a 500 when the elements are
      > typed. I've tried adding "->type('')" to each SOAP::Data->name, as
      > I've seen in the archives and elsewhere. But now I'm getting
      > something totally unexpected. Something like this:
      >
      > SOAP::Data->name('Top' => \SOAP::Data->value(
      > SOAP::Data->name('Key1' => 'Val1')->type(''),
      > SOAP::Data->name('Level1' => \SOAP::Data->value(
      > SOAP::Data->name('Key2' => 'Val2')->type('')
      > ))->type('')
      > ))->type('');
      >
      > produces something like this under SOAP::Trace:
      >
      > <Top xsi:type="namesp1">
      > <Key1>Val1</Key1>
      > <Level1 xsi:type="namesp1">
      > <Key2>Val2</Key2>
      > </Level1>
      > </Top>
      >
      > Note every time I tried to add "->type('')" to any element that
      > contained other elements, the output added the xsi:type attribute.
      > What did I do or not do to make that happen?
      >
      > --
      > Craig Dunigan
      > IS Technical Services Specialist
      > Middleware - EIS - DoIT
      > University of Wisconsin, Madison
      >
      > opinions expressed are my own, not the University's
    • Show all 3 messages in this topic