PyrexKidd has asked for the wisdom of the Perl Monks concerning the following question:
I'm attempting to work with a web application that was written in ColdFusion (not my choice).
Said web application exposes certain functions through an API that I would like to call using my Perl Script. The API is located in:
C:\domains\foo.com\wwwroot\websvc.cfc
I -think- I want to use SOAP::WSDL::Client to make the remote calls, but it's not working.
Here's the sample I'm working with:
#!/usr/bin/perl use 5.010001; use strict; use warnings; use SOAP::WSDL::Client; my $address = 'https://foo.com/websvc.cfc'; my $soap = SOAP::WSDL::Client->new( { proxy => $address; } ); my $IP = '127.0.0.1'; my $ret = $soap->call('getConfigByIP', $IP); say "Ret: $ret";
Obviously $address and $IP have been replaced with anonymous data in the sample.
The thing I really don't understand is the Docs show three different ways to make remote calls. http://search.cpan.org/~mkutter/SOAP-WSDL-2.00.10/lib/SOAP/WSDL/Client.pm
$soap->call( \%method, $body, $header); $soap->call( $method, \@parts ); sub mySoapMethod { my $self = shift; $soap_wsdl_client->call( mySoapMethod, @_); }
in the first example, $body and $header appear to be redundant. Also it doesn't seem that this method of RPC doesn't allow variables to be passed to the method.
The second method seems to be the same as the third but not in a subroutine.
In the third example $self is assigned the first var in @_, but then it uses the $soap_wsdl_client to call the SOAP method...
at first I thought this was a typo, but now I'm not so sure...
if it is not a typo, what does $self represent, and where is $soap_wsdl_client set?
Maybe I'm missing something... Well, I'm definitely missing something, but I'm not sure what. Any help would be greatly appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Coldfusion Integration
by Anonymous Monk on Jul 16, 2011 at 22:27 UTC | |
|
Re: Coldfusion Integration
by PyrexKidd (Monk) on Jul 19, 2011 at 17:32 UTC | |
by PyrexKidd (Monk) on Jul 19, 2011 at 19:33 UTC |