Next | SOAP::Lite Client Experiences | 12 |
When you need to construct data structures to pass to the SOAP service, then simplify your code with:
import SOAP::Data qw/name value/;
And use name() and value() when constructing the data structures.
my $reported = name( reportedbylist => [ name( item => \value( name( comments => $comments ), name( showorder => 0 )->type('xsd:short') ))->type('ttns:CReportedByRecord') ] ); my $defect = name('pDefect' => \value( name( summary => $summary ), name( enteredby => $currentUserName ), name( priority => $priority ), name( reference => $reference ), $reported ))->type('ttns:CDefect');
Note that the array reference with a special type will translate to an XML array.
Where do you find the type definitions? In the WSDL.
I think that SOAP::Lite should look at the WSDL for building data structures, but it doesn't.
Copyright © 2004 David Baird |