Hi, I need to call a CGI script which should be a web service from .NET environment.
I got an example in perl but I'm unable to trasform it into .NET (C#). Can anybody help me with this?
Thanks
I got an example in perl but I'm unable to trasform it into .NET (C#). Can anybody help me with this?
Code:
use SOAP::Lite;
die "Usage: perl call-ws.pl file.xml\n" unless $ARGV[0];
open F,$ARGV[0] || die "Could not read file $ARGV[0]\n";
my $val ="";
while (<F>) {
$val.= $_;
}
close F;
$val = SOAP::Lite
-> proxy('http://212...../Xml/external.cgi')
->outputxml('1')
->uri(AdXML)
->XMLrequest("domain?", "username", "password", $val);
sub SOAP::Transport::HTTP::Client::get_basic_credentials {
return 'username' => 'password';
}
$val =~s/>/>\n/g;
$val =~ s/\&/\&/g;
$val =~ s/\</</g;
$val =~ s/\>/>/g;
print "Server response =$val\n";