rich731 has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
I am trying to replicate the following code written in C#:
//In C#, using a web reference to auto generate the proxy class defini +tion, var proxy = new GSDIAuthentication.IGSDIBaseAuthentication +(); //Not needed, but showing where the web reference goes to +get the WSDL proxy.Url = "http://gsdi.goldstandard.com/GSDIAuthenticati +onWS.asmx?WSDL"; //Set up a string array with the key given to you by techn +ical support var urls = proxy.Authenticate(new [] { "KEY_ISSUED_BY_GOLDSTANDARD" } ); foreach (var url in urls) { //Use the URL field to attach this to an anchor tag se +rver side, this //url is what you want users to click on in order to a +ccess our site. //If an error has occurred, the url.ErrorDescription w +ill be populated //with the error message. Should be blank otherwise. Response.Write(url.ErrorDescription); Response.Write(url.Url); }
using the PERL SOAP::lite module. I am not familiar with either C# or SOAP so I am totally lost. Here is what I have so far:
#!/usr/bin/perl -w BEGIN { my $b__dir = (-d '/home/consumer/perl'?'/home/consumer/perl':( get +pwuid($>) )[7].'/perl'); unshift @INC,$b__dir.'5/lib/perl5',$b__dir.'5/lib/perl5/x86_64-lin +ux',map { $b__dir . $_ } @INC; } use strict; use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser); use SOAP::Lite; use SOAP::Transport::HTTP; my $cgi = new CGI; print header; #print required HTML headers print start_html('Token Results'); #print HTML Title my $soap = SOAP::Lite ->uri('http://gsdi.goldstandard.com/GSDIAuthenticationWS.asmx?WSDL +') ->proxy('http://GSDI.Authentication/2009/4/1/Authenticate'); my $drugID = 'KEY_ISSUED_BY_GOLDSTANDARD'; # Key for Drug ID print "I got here without error so far";
The goal is to pass the KEY_ISSUED_BY_GOLDSTANDARD and return a data from the server. The data is a URL that changes daily.
Thanks in advance for any help or direction.
Rich
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: SOAP::lite module help
by nikosv (Deacon) on Mar 27, 2012 at 05:52 UTC | |
by Anonymous Monk on Mar 27, 2012 at 06:17 UTC |
Back to
Seekers of Perl Wisdom