Perl requestor script to send SOAP

i am Using the 'sample' data attached to:
 Write a Perl requestor script check-policy.pl that will send a SOAP message to
http://homepages.feis.herts.ac.uk/~3com0109/cgi-bin/policy.cgi. which will:
-call the method checkPolicyPrice with two input values corresponding to the arguments
policyCode and date;
-print out the response that is returned from the policy.cgi service

any idea to get started?
sample-request.txt
evry2004Asked:
Who is Participating?
 
Adam314Connect With a Mentor Commented:
Where do the policyCode and date come from in the attached file?  There are several dates (start-date, end-date, and 2 DOB), and I don't see any policyCode.

For the SOAP portion:


use SOAP::Lite;
 
print SOAP::Lite
    -> service('http://homepages.feis.herts.ac.uk/~3com0109/cgi-bin/policy.cgi')
    -> checkPolicyPrice($policyCode, $date);

Open in new window

0
 
evry2004Author Commented:
policyCode and date  are in the cgi
0
 
evry2004Author Commented:
checkPolicyPrice function is provided by a policy module on the server
0
2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

 
Adam314Commented:
The code I posted in my first response will call the checkPolicyPrice using the specified service.
Is this what you wanted to do?
0
 
evry2004Author Commented:
yes if it's the full code because i am a new to it  should i include it in the sample code attached
0
 
Adam314Commented:
I'm not sure what you mean by "policyCode and date are in the cgi".
From where does your perl script get them?

The code I posted is complete for the SOAP portion.  It assumes that $policyCode and $date are defined somewhere.  If you clarify where they come from, I can help you with code to set those.
0
 
evry2004Author Commented:
$policyCode and $date are defined
0
 
Adam314Commented:
Then does the code I posted work?
0
 
evry2004Author Commented:
well i need to give your full mark now could you help with a good interpreter to execute this code i am using optiperl as an expert which one do you use
0
 
evry2004Author Commented:
logic
0
 
Adam314Commented:
On unix systems, I use the perl that comes with the distribution.  On windows, I use the activeperl distribution.

On unix, you should have a package manager that should help you get perl installed (if it isn't already installed).
On windows, you can get activeperl for free at: www.activestate.com
With activeperl, you can install modules using ppm.  You can still use cpan and install from source, but since windows doens't come with a compiler, it's easier to use ppm (not all modules are available - but the most common ones are)
0
 
evry2004Author Commented:
thank you
0
All Courses

From novice to tech pro — start learning today.