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.


In reply to Coldfusion Integration by PyrexKidd

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.