I was expecting output like#!C:/perl/bin/perl -w use strict; use SOAP::Data::ComplexType; package My::Complex; use base qw(SOAP::Data::ComplexType); use constant OBJ_TYPE => 'myns:complex'; use constant OBJ_URI => 'http://my.uri.com'; use constant OBJ_FIELDS => { string_array => [ 'SOAP-ENC:Array', undef, { 'SOAP-ENC:arrayType' => 'string +' } ] }; sub new { my $proto = shift; my $class = ref($proto) || $proto; my $data = shift; my $obj_fields = $_[1]; #second param from untouched @_ $obj_fields = defined $obj_fields && ref($obj_fields) eq 'HASH' ? +{%{+OBJ_FIELDS}, %{$obj_fields}} : OBJ_FIELDS; my $self = $class->SUPER::new($data, $obj_fields); return bless($self, $class); } my $complex = My::Complex->new({string_array => [ 'text1', 'text2', 't +ext3' ]}); print $complex->as_xml_data;
but all I got was three <string_array>s. I'm using SOAP::Data::ComplexType 0.044 running on ActivePerl. Please tell me what kind of mistake I've made...<string_array type="xsi:SOAP-ENC:Array" SOAP-ENC:arrayType="xsd:string +[3]"> <item xsi:type="xsd:string">text1</item> <item xsi:type="xsd:string">text2</item> <item xsi:type="xsd:string">text3</item> </string_array>
In reply to SOAP array construction with SOAP::Data::ComplexType by takeos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |