473,698 Members | 2,628 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

1 New Member
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 1018

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

Similar topics

5
2186
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 Framework 1.1 then reinstall, unfortunately this seems to have done nothing. I've tried calling aspnet_regiis in a number of ways but that seems to do nothing either, even though it says that uninstallation and installation completes...
2
2036
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 example that they can send me it would be very much appreciated. Drop me an email at: samadams_2006@yahoo.ca Thanks...
0
1047
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 been re-written using Asp.net. The old web service calls were made using : http://MyCompany/soap/NewsService (i.e. without any extension). What I need to do is "redirect" http://MyCompany/soap/NewsService to
0
1724
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 Crystal report I find that the "Publish as Web Service" option is missing. Do I need to install a VS.Net component to make this option available? Any clues on other ways to generate the asmx file to create a publish the crystal report as a web...
0
8683
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8610
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9031
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8902
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2339
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.