Consuming ColdFusion web service with Perl.

View: New views
3 Messages — Rating Filter:   Alert me  

Consuming ColdFusion web service with Perl.

by Ian Skinner-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Anybody out there have the pleasure of consuming a ColdFusion webservice
that returns complex data in Perl?  I am trying to develop and debug a
web service to be used by both ColdFusion and Perl applications.

I can call the web service and return simple values no problem.  But
when I start looking at the methods the return complex data, I just
can't seem to figure out or find anything that makes heads or tails of
what I am supposed to do.

I get the following types of results:
ARRAY(0x1edacc8)
HASH(0x1ed8618)
QueryBean=HASH(0x1eed634)
basic=HASH(0x1ea4cb4)

How does somebody actually make use of the data contained inside these
array, hash, QueryBean and object complex data types?

TIA
Ian

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: http://www.houseoffusion.com/groups/CF-OT/message.cfm/messageid:623
Subscription: http://www.houseoffusion.com/groups/CF-OT/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.29

Re: Consuming ColdFusion web service with Perl.

by Adam Haskell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What module are you using in PERL?

Those look like memory references maybe you are not dereferencing the data
you want properly?

Adam


On Wed, Apr 2, 2008 at 2:43 PM, Ian Skinner <HOF@...> wrote:

> Anybody out there have the pleasure of consuming a ColdFusion webservice
> that returns complex data in Perl?  I am trying to develop and debug a
> web service to be used by both ColdFusion and Perl applications.
>
> I can call the web service and return simple values no problem.  But
> when I start looking at the methods the return complex data, I just
> can't seem to figure out or find anything that makes heads or tails of
> what I am supposed to do.
>
> I get the following types of results:
> ARRAY(0x1edacc8)
> HASH(0x1ed8618)
> QueryBean=HASH(0x1eed634)
> basic=HASH(0x1ea4cb4)
>
> How does somebody actually make use of the data contained inside these
> array, hash, QueryBean and object complex data types?
>
> TIA
> Ian
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: http://www.houseoffusion.com/groups/CF-OT/message.cfm/messageid:624
Subscription: http://www.houseoffusion.com/groups/CF-OT/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.29

Re: Consuming ColdFusion web service with Perl.

by Ian Skinner-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Adam Haskell wrote:
> What module are you using in PERL?
>  
SOAP::Lite
> Those look like memory references maybe you are not dereferencing the data
> you want properly?
>  
Yeah, that is what I am trying to figure out.  This is what I have so
far, is this as efficient as it gets?
### Function returns array  
$aryRsp = $complexSoapReq
    -> getAry();
   
print $aryRsp->result() . "\n";

@bar = $aryRsp->valueof('//getAryResponse/getAryReturn/getAryReturn');
print "-----\n";
foreach $i (@bar)
{
    print "$i\n";  
}
print "\nitem 2: ".@bar[1]."\n";
print "-----\n\n";

### Function returns structure i.e. hash array.
$structRsp = $complexSoapReq
    -> getStruct();
       
print $structRsp->result() . "\n";

@bar = $structRsp->valueof('//getStructReturn/item');
print "-----\n";
foreach $i (@bar)
{
    print $i->{'key'}.': '.$i->{'value'}."\n";  
   
    foreach $j (keys %{$i})
    {
        print $j . ": " . $i->{$j} . ' ';
    }
    print "\n\n";
}
print "-----\n\n";


I still need to figure out what to do with a queryBean aka record set
and a returned object.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: http://www.houseoffusion.com/groups/CF-OT/message.cfm/messageid:625
Subscription: http://www.houseoffusion.com/groups/CF-OT/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.29