473,385 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Calling CGI script ("web service") from .NET

1
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?
Expand|Select|Wrap|Line Numbers
  1. use SOAP::Lite;
  2.  
  3. die "Usage: perl call-ws.pl file.xml\n" unless $ARGV[0];
  4. open F,$ARGV[0] || die "Could not read file $ARGV[0]\n";
  5. my $val ="";
  6. while (<F>) {
  7.         $val.= $_;
  8.         }
  9. close F;
  10.  
  11. $val =  SOAP::Lite
  12.         -> proxy('http://212...../Xml/external.cgi')
  13.         ->outputxml('1')
  14.         ->uri(AdXML)
  15.         ->XMLrequest("domain?", "username", "password", $val);
  16.  
  17. sub SOAP::Transport::HTTP::Client::get_basic_credentials { 
  18.    return 'username' => 'password';
  19. }
  20.  
  21.  
  22. $val =~s/>/>\n/g;
  23. $val =~ s/\&amp;/\&/g;
  24. $val =~ s/\&lt;/</g;
  25. $val =~ s/\&gt;/>/g;
  26.  
  27. print "Server response =$val\n";
  28.  
Thanks
Feb 11 '08 #1
0 994

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Nick | last post by:
Hi there, I despearately need to get IIS working with ASP.NET, but I still can't see any "Web Service Extensions". My previous question regarding this ended in the decision to uninstall .NET...
2
by: samadams_2006 | last post by:
I'm trying to get a simple VB.NET "Web Application" (not a regular application) to work with an Access Database. Seems simple enough, but I cannot seem to get it working. If anyone has a simple...
0
by: sham | last post by:
Hi to all, Sorry for the repost. I asked this question about 2 weeks ago and I have had no reply. I tried on the IIS group, but still no luck. Basically, we have a web service that has now...
0
by: Ken | last post by:
Hello- I am following this article to publish a Crystal Report, inside a VS.Net project, as a web service - http://msdn2.microsoft.com/en-us/library/aa288396(VS.71).aspx When I right click on the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.