1 Reply Latest reply on Aug 26, 2006 1:43 PM by wentwj68

    Newbie CFC Argument Question

      So I've just started working in Flex, and I'm trying to send arguments to a CFC. I'm able to run methods on the CFC that don't require arguments, but I get nasty errors whenever I attempt to send an argument.

      Heres the CFC function I'm trying to use:

      <cffunction name="addToNews" access="remote" returntype="void">
      <cfargument name="title" type="string" required="yes" />
      <cfargument name="content" type="string" required="yes" />
      <cfquery name="AddNews" datasource="#Application.DSN#">
      INSERT INTO news (userID, time, title, content)
      VALUES (1, CreateODBCDateTime(Now()), '#title#', '#content#')

      And heres the webserice I'm using in Flex:
      <mx:WebService id="beachPatrol"
      wsdl=" http://www.beachpatrol.net/remote/component.cfc?wsdl">
      <mx:operation name="addToNews" result="handleResponse(event)">

      Heres the Nasty Error:
      [RPC Fault faultString="HTTP request error" faultCode="Server.Error.Request" faultDetail="Error: [IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://www.beachpatrol.net/remote/component.cfc" URL: http://www.beachpatrol.net/remote/component.cfc"
      at mx.rpc::AbstractInvoker/ http://www.adobe.com/2006/flex/mx/internal::faultHandler()
      at mx.rpc::Responder/fault()
      at mx.rpc::AsyncRequest/fault()
      at ::DirectHTTPMessageResponder/errorHandler()
      at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
      at flash.events::EventDispatcher/dispatchEvent()
      at flash.net::URLLoader/flash.net:URLLoader::redirectEvent()

      Now admitted, I'm very new to this so there's a good chance I'm just doing something crazy wrong here, but it all looks fairly straightforward to me, and I've seen examples of people sending arguments using the mx:request tag before.

      Do I need to install something on my server? It seems a better way may be to use Remote Objects, but so far I havn't been able to find any good tutorial on using those, and all my feable attempts at it have failed. Also I'm using shared hosting on goDaddy, so if installing sometihng onto the server is anything more than dropping files into the directory, I don't think I can do that.

      Any help at all would be appreciated.