Question
Simple cfinvoke not working
I have a page calling a pretty basic function of my CFC.
Here's the code of the calling page:
<cfscript>
session.stCampaignData=structNew();
session.stCampaignData.campaignName="my name";
session.stCampaignData.campaignDesc="description";
</cfscript>
<cfinvoke component="#application.pathToMyCFC#" method="addCampaign" argumentcollection="#session.stCampaignData#">
Here's the function code:
<cffunction name="addCampaign" hint="Adds a Campaign to the system." access="public" returntype="void" output="false">
<cfargument name="stCampaignData" type="struct" required="true" />
...
</cffunction>
But no matter what, this function bombs. It's as if the argument never makes it:
The STCAMPAIGNDATA parameter to the addCampaign function is required but was not passed in.
If I set the output to true, in the function call, I can dump the session.stCampaignData structure.
Am I overlooking something??
TIA
<cfscript>
session.stCampaignData=structNew();
session.stCampaignData.campaignName="my name";
session.stCampaignData.campaignDesc="description";
</cfscript>
<cfinvoke component="#application.pathToMyCFC#" method="addCampaign" argumentcollection="#session.stCampaignData#">
Here's the function code:
<cffunction name="addCampaign" hint="Adds a Campaign to the system." access="public" returntype="void" output="false">
<cfargument name="stCampaignData" type="struct" required="true" />
...
</cffunction>
But no matter what, this function bombs. It's as if the argument never makes it:
The STCAMPAIGNDATA parameter to the addCampaign function is required but was not passed in.
If I set the output to true, in the function call, I can dump the session.stCampaignData structure.
Am I overlooking something??
TIA
