in reply to Reading the XML Response in SOAP::Lite

It sounds like you just want to write a custom deserializer then.

You can either extend the SOAP::Serializer in SOAP::Lite to do what you need, or if you already have everything, you can create something with a 'deserialize' method.

my $soap = SOAP::Lite ->uri($uri) ->proxy($proxy) ->deserializer( My::Deserializer->new() ); $soap->DoSomething(); ##### # fake deserializer, for debugging purposes package My::Deserializer; use SOAP::Lite; use base qw(SOAP::Deserializer); sub deserialize { require Data::Dumper; warn "deserializer : ",Dumper(@_); SOAP::Deserializer::deserialize( @_ ); }

(note -- I've hacked this up from the deserializer that I use for debugging, but I have another layer of abstraction in there, so this should serve as a base, but may not work directly out of the box)

Replies are listed 'Best First'.
Re^2: Reading the XML Response in SOAP::Lite
by XenoCyber (Initiate) on Jun 07, 2005 at 18:14 UTC

    Thanks, but how were you able to inherit from SOAP::Deserializer if that is not a real module but a package within a module.

    Did you detach the Deserializer code from SOAP/Lite.pm and create SOAP/Deseralizer.pm ?

    I get this error when running your code:

    Can't locate SOAP/Deserializer.pm in @INC (@INC contains: ...

      I knew there was a reason that I didn't feel good about the code. (I have another module in the middle, as my debugging serializer calls that, and not SOAP::Serializer directly, but I didn't think you wanted 15k of code to explain the basic concept).

      My main serializer had to manipulate @ISA directly, rather than using 'use base'.