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

5574Re: [soaplite] SOAP::SOM problem: only last element of array is returned under mod_perl

Expand Messages
  • Eric Bridger
    Aug 30, 2006
    • 0 Attachment
      Are you creating your "$som" from a Soap::Lite->service() call, i.e.
      from WSDL?
      If that's the case $som->some_method() will not return an SOM object but
      what it thinks is the result.

      Try doing $som->want_som(1) first which will return a true SOM.

      Eric


      On Wed, 2006-08-30 at 08:59, Sherzod Ruzmetov wrote:
      > Hi,
      >
      > During debug I get the following response message:
      >
      > <!-- snippet -->
      > <CustomCategories>
      > <CustomCategory>
      > <CategoryID>1</CategoryID>
      > <Name>Other</Name>
      > <Order>0</Order>
      > </CustomCategory>
      > <CustomCategory>
      > <CategoryID>4715609</CategoryID>
      > <Name>Thomas Kinkade</Name>
      > <Order>21</Order>
      > </CustomCategory>
      > <CustomCategory>
      > <CategoryID>4715610</CategoryID>
      > <Name>G. Harvey</Name>
      > <Order>8</Order>
      > </CustomCategory>
      > <CustomCategory>
      > <CategoryID>4715611</CategoryID>
      > <Name>P. Buckley Moss</Name>
      > <Order>10</Order>
      > </CustomCategory>
      > <! -- end snippet -->
      >
      > But when I do $som->method() I only get the last item, instead of getting a
      > list of //CustomCategories/CustomCategory.
      >
      > This problem is only present when my application is running as a mod_perl
      > handler, but works as expected when run as a mod_cgi script (and no, I'm not
      > new in mod_perl programming).
      >
      > Does anyone have any idea, what may be going wrong? I am absolutely positive
      > it has something to do with the way SOAP::SOM deserializes messages.
      >
      > Before I looked into this any further I wanted to check if anyone already
      > has an idea what the problem is, or can point me in the right direction
      > before I am bound to waste hours (if not days) poking in the wrong place,
      > for I'm sure I'm not the only person with this problem (or am I :) ).
      >
      > Thanks for everyone who contributed in putting together this great
      > distribution, and making it free for the whole World to use, and bringing it
      > to the quality it has reached today. Great work!
      >
      >
      > --
      > Sherzod Ruzmetov
      > http://author.handalak.com/
      >
    • Show all 3 messages in this topic