Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Unable to invoke CFC - The DATA parameter to the addMarginOrRefund function is required but was not

Enthusiast ,
Jan 19, 2010 Jan 19, 2010

Im calling a remote object like so to the server

private function addMarginOrRefund(event:MarginCall_or_Refund_Event):void
            {
                myService.addMarginOrRefund(event.data);// cf calls a sp
            }


CF


<cffunction name="addMarginOrRefund" access="remote" returntype="void">
  <cfargument name="data" type="Any" required="yes">

    <cfquery name="q" datasource="#datasource#">   
                       
                       
                        INSERT INTO [tb_MarginCall_or_refund]
           ([clientID]
           ,[dealerID]
           ,[isMarginCall]
           ,[currency]
           ,[amount]
           ,[dateRequested])
     VALUES
           (
<cfqueryparam value="#arguments.data.clientID#" cfsqltype="cf_sql_integer">,
<cfqueryparam value="#arguments.data.clientID#" cfsqltype="cf_sql_integer">,
<cfqueryparam value="#arguments.data.isMarginCall#" cfsqltype="cf_sql_bit">,
<cfqueryparam value="#arguments.data.currency#" cfsqltype="cf_sql_varchar">,
<cfqueryparam value="#arguments.data.amount#" cfsqltype="cf_sql_numeric">,
<cfqueryparam value="#arguments.data.date#" cfsqltype="cf_sql_date">,
              
                       
                        </cfquery>

</cffunction>

but I get an fault on the flex side

faultCode:Server.Processing faultString:'Unable to invoke CFC - The DATA parameter to the addMarginOrRefund function is required but was not passed in.' faultDetail:''

not sure why I should get this, any help would be appreciated

TOPICS
Flash integration
1.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jan 19, 2010 Jan 19, 2010

Are you sure the event data you are passing in is event:MarginCall_or_Refund_Event  exists and isn't NULL?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 19, 2010 Jan 19, 2010

everything looks fine in debug

event    customevents.MarginCall_or_Refund_Event (@2b0e8581)   
    [inherited]   
    data    models.MarginCall_or_Refund (@2b0e8511)   
        amount    2   
        clientID    1   
        currency    "GBP"   
        date    Date (@14f85a31)   
        dealerID    0   
        isMarginCall    false  

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 20, 2010 Jan 20, 2010

I think the problem is that cf doesn't know how to deal with the

MarginCall_or_Refund

type object, not sure how best to fix this

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 20, 2010 Jan 20, 2010

so strange I even treid this:

private function addMarginOrRefund(event:MarginCall_or_Refund_Event):void
            {
                //myService.addMarginOrRefund(event.data);// cf calls a sp
                var it:Object = event.data;
                myService.addMarginOrRefund(it);// cf calls a sp
            }

I wathced in debug and everything seems fine. I've sent objects like this before in cf and I can't figure out whats different.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 20, 2010 Jan 20, 2010

for some reason if I put an extra <cfargument before the object the whole thing works

private function addMarginOrRefund(event:MarginCall_or_Refund_Event):void
            {
                myService.addMarginOrRefund("fake",event.data);// cf calls a sp
            }


<cffunction name="addMarginOrRefund" access="remote" returntype="void">
  <cfargument name="fake" type="string" required="yes">

  <cfargument name="data" type="Any" required="yes">

could be a CF9 bug?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Nov 12, 2010 Nov 12, 2010
LATEST

This bug still exists in cf9 and fb4

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources