Sorry for the repost, but I know that the Adobe folks were pretty occupied last week. Trying this one again...
On 2/4/06, Jason Y. Kwong <
[EMAIL PROTECTED]> wrote:
I'm attempting to call a CFC from a Flex 2.0 app. I would prefer to use RemoteObject but our ColdFusion server is running on Linux so we've got no Flex Connectivity. So I'm still using the WebService object to make calls via SOAP. This works fine normally, but things mess up if I try to pass a nested object to the CFC. Here's a simple example CFC method I'm trying to call:
<cffunction name="testMethod" access="remote" returntype="string">
<cfargument name="data" type="struct" required="yes">
<cfreturn data.name>
</cffunction>
In my Flex app, I create a WebService object:
<mx:WebService id="service" wsdl="..." result="onResult(event)" fault="onFault(event)"/>
If I call it the following way, everything works fine:
var parm: Object = new Object();
parm.name = "XXX";
service.testMethod(parm);
I can add as many scalar properties to "parm" as I want. However, as soon as I add an Object property, it messes up. eg:
parm.name = "XXX";
parm.stuff = {id:"123"};
The service generates a fault and I get the generic "HTTP request error". The fault detail isn't that helpful:
Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false text="Error #2032: Stream Error. URL: http://..."]. URL: http://...
The server logs aren't that helpful either. Our CF server is fronted by Apache. The Apache logs do show a 500 result for the request (but nothing else). However, the CF logs show nothing at all. It's like the call/error never happened.
I never had this kind of problem when I used Flash Remoting with Flash MX. Can anybody shed some light on this?
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.