# remove the +trace => all to remove extensive output HTTP/SOAP traces use SOAP::Lite +trace => all; # instantiate a soap client object my $soap = SOAP::Lite -> uri('https://ws2.sticomputer.com/LabVendorWeb/LabVendor.asmx') -> on_action( sub { '"'.join('/', 'http://sticomputer.com/lab', $_[1]).'"' } ) -> proxy('https://ws2.sticomputer.com/LabVendorWeb/LabVendor.asmx'); # call the Ping() method print "Calling Ping...\n"; print $soap->Ping()->result; print "done.\n"; # call the HelpAbout() method print "Calling HelpAbout...\n"; my $result = $soap->HelpAbout(); print $result->valueof('//HelpAboutResult' )."\n"; print "done.\n"; # call the PutFile() method print "Calling PutFile...\n"; my $method = SOAP::Data->name('PutFile') ->attr({xmlns => 'http://sticomputer.com/lab'}); my @params = ( SOAP::Data->name(vendorID => 'ABC'), SOAP::Data->name(vendorPassword => 'ABC'), #SOAP::Data->name(fileData => 'HELLOWORLD')); print $soap->call($method => @params)->result . "\n"; print "done.\n"; <>; # pause
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)