472,111 Members | 1,923 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Help!! How to access data from an apache web server using soap in Visual Studios

1
Hi,

I am only new to development and have been given a task to convert a Perl script to a Windows Service. The issue I am facing is that the current Perl Script uses a SOAP call to an Apache Web Server to retrieve data through https xml feeds.

I am unable to locate any help on how to write this in c#. I am using Visual Studios 2005. I have provided part of the Perl Script if it helps (I have altered the proxy and uri for security reasons). I have left out part of the script which I believe only does data manipulation.

Just for a bit of extra information, there is an apache web server which I need to connect to to access the xml data using SOAP. I have tried to add a web refference but it doesn't work. I am a bit confused as I was given an address which looked a bit like this" https://20.xxx.x.xx/xxxxdy/xxxxgrate.cgi " and maybe the fact that it is a .cgi is th reason I am unable to use it when looking for avaliable services in Add Web Reference.

I would also like to thank anyone who can provide help in advance.

#use strict;
use Data::Dumper;
use DBI;

my $proxy = "https://soap:xxxxxx\@20.250xxxxxx/xxxxxxxxx/xxxxxxxxxx.cgi";
my $uri = "https://20.xx.xx/xxxxxxxxServer";

use SOAP::Lite;
@My::SOAP::Lite::ISA = 'SOAP::Lite';
my $SOAP = My::SOAP::Lite
->uri($uri)
->proxy($proxy);


my $VAR1 = {
'source' => 'NetEISS',
'names' => 'ALL',
'tools' => ['UnixSOE'],
'action' => 'GET',
'class' => 'ServerDevice',
'attributes' => 'ALL',
};


SOAPCall($VAR1);


sub SOAPCall
{
my ($ref_arguments) = @_ ;
my %arguments = %$ref_arguments;

print "Data Sent \n".Dumper(%arguments);

my $result;

my $refResult = $SOAP->endpoint($proxy)->ActionRequest($ref_arguments);
if ($refResult->fault)
{
print join ', ',
$refResult->faultcode,
$refResult->faultstring;
}
else
{
$result = $refResult->result;
}

........................
Mar 31 '08 #1
0 976

Post your reply

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

Similar topics

1 post views Thread by Kevin Payne | last post: by
1 post views Thread by Neil Stansbury | last post: by
reply views Thread by leo001 | last post: by

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.