in reply to SOAP array construction with SOAP::Data::ComplexType
I was tired of writing a large complex data with plain SOAP::Data and was so glad to have found SOAP::Data::ComplexTypeStop right there. You don't have to construct SOAP::Data hierarchies by hand!. Use SOAP::WSDL (instead of SOAP::Lite), which
- handles the namespaces for you
- constructs outgoing complexType values (including arrays) automatically from normal perl data-structures.
- is a subclass of SOAP::Lite.
I simply cannot believe how many folks are doing this the hard way. It's almost like Perl-based users of SOAP hate themselves ;)
A service method Foo expecting an array of xsd:string elements for the argument called 'Words' can be called as follows:
$soap->Foo(Words => [qw/this is a test!/]);
No need to hand-construct anything under SOAP::Data at all.
-David
In Section
Seekers of Perl Wisdom