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

Problems with serializing complex data types

Expand Messages
  • Gregor Goldbach
    Hi list, I m having problems with serializing complex data types. SOAP::Lite seems to be able to serialize a rather small set of standard types, even such
    Message 1 of 1 , Nov 5, 2007
    • 0 Attachment
      Hi list,

      I'm having problems with serializing complex data types.

      SOAP::Lite seems to be able to serialize a rather small set of standard
      types, even such 'simple complex types' as ArrayOfString won't get
      serialized properly.

      An ArrayOfString gets serialized iff I include this snippet im my code:

      *SOAP::Serializer::as_ArrayOfString = sub {
      my ($self, $value, $name, $type, $attr)=@_;
      return [$name, \%$attr, $value];
      };

      I found this by pure accident. Is there a piece of documentation that
      explains why I have to do this? And why does the *de*serialization
      automagically work, too?

      Basically my perl program boils down to this:

      use strict;
      use warnings;
      use SOAP::Lite;

      [...]

      my $soap = SOAP::Lite->new();
      $soap->import( +trace => 'debug' ) if $debug;

      my $pub = $soap->service("$server/$wsdl");

      # method call...

      The WSDL is generated by Pod::WSDL and seems to be correct since Java
      clients work well with it. My SOAP::Lite version is 0.69.

      --
      Gregor Goldbach (PKI Team), DFN-CERT Services GmbH, Phone: +49 40 808077-621

      DFN-CERT Services GmbH, https://www.dfn-cert.de, Phone +49 40 808077-555
      Sitz / Register: Hamburg, AG Hamburg, HRB 88805, Ust-IdNr.: DE 232129737
      Heidenkampsweg 41, 20097 Hamburg/Germany, CEO: Dr. Klaus-Peter Kossakowski
    Your message has been successfully submitted and would be delivered to recipients shortly.