Click here to Skip to main content
15,891,837 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have the following Perl/Soap script to connect to a website. I need to add a section to send files with a hl7 extension from a folder c:\ftp\newtown. If someone can provide me with a sample on how to add this to my script I would greatly appreciate it.
PERL
# 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
Posted
Updated 13-Feb-11 4:53am
v2
Comments
Manfred Rudolf Bihy 13-Feb-11 10:53am    
Edit: Lower cased title. Added pre tags.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900