#!/usr/bin/perl
use Net::FTP;
use SOAP::Lite;
my $server="xxxxx";
my $user="xxxx";
my $pass="xxxx";
my $path="/xx/xxx/xxx/xxxx";
if($ftp = Net::FTP->new("$server", Timeout=>60, Debug=>0)){
if($ftp->login("$user","$pass")){
$ftp->binary();
if($ftp->cwd("$path")){
open($remote_file_handle, '>', \$remote_file_content);
$ftp->get("upload.txt", $remote_file_handle) or die "get failed ", $ftp->message;
close($remote_file_handle);
}
}
}
@result = SOAP::Lite
-> service("http://servername/soap/xxx.wsdl")
-> on_fault(sub { my($soap, $res) = @_; die ref $res ? $res->faultstring : $soap->transport->status,})
-> SOAPCall(
SOAP::Data->name(stream=>$remote_file_content)->type('string'));
use Data::Dumper;
print Dumper @result;
use Net::FTP;
use SOAP::Lite;
my $server="xxxxx";
my $user="xxxx";
my $pass="xxxx";
my $path="/xx/xxx/xxx/xxxx";
if($ftp = Net::FTP->new("$server", Timeout=>60, Debug=>0)){
if($ftp->login("$user","$pass")){
$ftp->binary();
if($ftp->cwd("$path")){
open($remote_file_handle, '>', \$remote_file_content);
$ftp->get("upload.txt", $remote_file_handle) or die "get failed ", $ftp->message;
close($remote_file_handle);
}
}
}
@result = SOAP::Lite
-> service("http://servername/soap/xxx.wsdl")
-> on_fault(sub { my($soap, $res) = @_; die ref $res ? $res->faultstring : $soap->transport->status,})
-> SOAPCall(
SOAP::Data->name(stream=>$remote_file_content)->type('string'));
use Data::Dumper;
print Dumper @result;