Next | SOAP::Lite Client Experiences | 13 |
I had a script in which I needed to read records, change fields and rewrite them.
SOAP::Lite was able to translate the XML message to a referenced hash:
my $defect = $soap->editDefect( $cookie, $this->{'No.'}, '' ); my $newEventNum = scalar(@{$defect->{eventlist}}) + 1; $defect->{eventlist} = [ name( item => \value( name( assignedby => $this->{'Fixed By'} ), name( user => $this->{'Entered by'} ), name( dateTime => $this->{'Date Fixed'} )->type('xsd:date'), name( eventaddorder => $newEventNum )->type('xsd:short') ))->type('ttns:CAssignDefectEvent')->attr({'xmlns:ttns' => $ns}) ];
But when I saved the record, I got errors from the server about invalid data types.
$soap->saveDefect( $cookie, $defect );
SOAP::Lite wan't remembering the data types of the values in the hash.
Copyright © 2004 David Baird |