We help IT Professionals succeed at work.

Perl requestor script to send SOAP

evry2004
evry2004 asked
on
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
Comment
Watch Question

Top Expert 2009
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

Author

Commented:
policyCode and date  are in the cgi

Author

Commented:
checkPolicyPrice function is provided by a policy module on the server
Top Expert 2009

Commented:
The code I posted in my first response will call the checkPolicyPrice using the specified service.
Is this what you wanted to do?

Author

Commented:
yes if it's the full code because i am a new to it  should i include it in the sample code attached
Top Expert 2009

Commented:
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.

Author

Commented:
$policyCode and $date are defined
Top Expert 2009

Commented:
Then does the code I posted work?

Author

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

Author

Commented:
logic
Top Expert 2009

Commented:
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)

Author

Commented:
thank you

Explore More ContentExplore courses, solutions, and other research materials related to this topic.