Has anyone ever used perl to pass an array to a CFC web service? I can't find any examples on the web, just simple values get passed it seems.
I can call a CFC web service from perl and pass an array of strings and it works okay. But if I try to pass an array of hashes, it fails. Do I somehow need to indicate that the CFC should expect an array of structures instead of just an array? How would I do that? Here's my perl code: #!perl -w use SOAP::Lite proxy => 'http://webftc18/com/woodward/bradex2.cfc?wsdl', uri => 'http://woodward.com/bradexamples' ; my $soap1 = new SOAP::Lite; my @smallArr = ('one','two'); my $brad4 = $soap1->print2nd(\@smallArr); # THIS ONE WORKS OKAY print $brad4->result,"\n"; my @ltarr; my $rec; $rec = { NUM => 3, MYSTRING => 333 }; push @ltarr, $rec; $rec = { NUM => 2, MYSTRING => 222 }; push @ltarr, $rec; my $response = $soap1->lessThan(\@ltarr); die "Fault: ".$response->faultcode." ".$response->faultdetail." ".$response->faultstring if $response->faultcode; print $response->result,"\n"; And here are my results: two Fault: ns1:Server.userException HASH(0x2104bf4) org.xml.sax.SAXException: No des erializer defined for array type http://xml.apache.org/xml-soap:SOAPStruct at C: \Perl\bin\cftalk.pl line 24. And here is the CFC code: <cfcomponent output="false"> <cffunction name="lessThan" returnType="string" output="no" access="remote"> <cfargument type="array" name="arr" required="true"> <cfreturn arr[1].mystring> </cffunction> <cffunction name="print2nd" returnType="string" output="no" access="remote"> <cfargument type="array" name="arr" required="true"> <cfreturn arr[2]> </cffunction> </cfcomponent> I appreciate any pointers you can give me. *** The information in this e-mail is confidential and intended solely for the individual or entity to whom it is addressed. If you have received this e-mail in error please notify the sender by return e-mail, delete this e-mail, and refrain from any disclosure or action based on the information. **** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4