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

do CFOBJECT work in CFC File ?

New Here ,
Oct 19, 2006 Oct 19, 2006

Copy link to clipboard

Copied

Hello,

I have problems with implement cfobject in component.

Ex :

<cfcomponent>
<cffunction name="GetInfo" access="remote" returnType="numeric">
<cfobject name="acti" component="flashservice.test" >
<cfset tret=acti.Info()>
<cfreturn tret>
</cffunction>
</cfcomponent>

The same function work in .CFM and here an error My.CFC have not GetInfo method.

Thanks
Sébastien
TOPICS
Advanced techniques

Views

940

Translate

Translate

Report

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
LEGEND ,
Oct 19, 2006 Oct 19, 2006

Copy link to clipboard

Copied

What is the code you're using to call the getInfo() method, and what
precise error do you get (copy it from the screen and paste it in here).

--
Adam

Votes

Translate

Translate

Report

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
New Here ,
Oct 19, 2006 Oct 19, 2006

Copy link to clipboard

Copied

This service is call from client flash in actionscript :

var IntroService= _root.gatewayConnnection.getService("flashservice.coolf", this);
IntroService.getInfo();

Here coolf is CFC
And the 2nd call (cfobject...) to test. ASR
If I call directly test.ASR from Client -> All ok
The client can call CFC or ASR as the same.
But on server CFC can call ASR !
I don't know if calling CFC From a ASR is possible

Thanks Adam
Sébastien

Votes

Translate

Translate

Report

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
LEGEND ,
Oct 20, 2006 Oct 20, 2006

Copy link to clipboard

Copied

> This service is call from client flash in actionscript :

OK, well I'm out of my depth now.

What happens if you write a CF test rig for it, and call it?

--
Adam

Votes

Translate

Translate

Report

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
New Here ,
Oct 20, 2006 Oct 20, 2006

Copy link to clipboard

Copied

When I call CFC from CFC with <cfobject type="component">, the call work fine
The problem is when <cfobject> call ASR service from CFC.

Thanks
Sébastien

Votes

Translate

Translate

Report

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
LEGEND ,
Oct 20, 2006 Oct 20, 2006

Copy link to clipboard

Copied

Can you post your CF test rig.

It's easier if you provide the code and the errors, rather than describing
what you're doing.

--
Adam

Votes

Translate

Translate

Report

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
New Here ,
Oct 23, 2006 Oct 23, 2006

Copy link to clipboard

Copied

HI,

I have a problem, test.asr have more 22000 lines and the CFC components more 10 000.
The summery is as this :

Thanks

Seb

Votes

Translate

Translate

Report

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
New Here ,
Oct 23, 2006 Oct 23, 2006

Copy link to clipboard

Copied

And the error is :

Votes

Translate

Translate

Report

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
LEGEND ,
Oct 23, 2006 Oct 23, 2006

Copy link to clipboard

Copied

> Could not find the
> ColdFusion Component flashservice.bullengine

There is no mention of this CFC anywhere (taht I can see) in the code
extracts you've provided. Am I missing something?

--
Adam

Votes

Translate

Translate

Report

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
LEGEND ,
Oct 23, 2006 Oct 23, 2006

Copy link to clipboard

Copied

> test.asr have more 22000 lines and the CFC components more
> 10 000.

You are kidding, right? You have a 10000-line CFC?

--
Adam

Votes

Translate

Translate

Report

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
New Here ,
Oct 23, 2006 Oct 23, 2006

Copy link to clipboard

Copied

Hi,

Of course, it's right, with multiple <cfinclude>...
We have a very big application.

The CFC is just on message up.
thanks

Votes

Translate

Translate

Report

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
New Here ,
Oct 23, 2006 Oct 23, 2006

Copy link to clipboard

Copied

the bullengine is not the name of this exemple, it's the same of test.asr, in real production.
The probleme is when invoke test.asr in CALL.CFC
The test.asr is not view as a regular component or web service.
I can't call test.asr from CALL.CFC. This is my problem.

Thanks

Votes

Translate

Translate

Report

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
New Here ,
Oct 23, 2006 Oct 23, 2006

Copy link to clipboard

Copied

effectively, the size of my code is certainely a problem.
"This method of calling a function in another component works fine if the component is called via "<CFINVOKE Component=" but, for some strange reason, doesn't work when called as a web service. Yes, it's the exact same function that is being called, but CF is evidently a bit more cranky when called as a web service. So we found that the only way to access a function in another component when called via a web service is to store that component in the Application scope."

the more at : http://mx.sys-con.com/read/86108.htm

The solution is here
Thanks.
Seb

Votes

Translate

Translate

Report

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
LEGEND ,
Oct 24, 2006 Oct 24, 2006

Copy link to clipboard

Copied

> When I call CFC from CFC with <cfobject type="component">, the call work fine
> The problem is when <cfobject> call ASR service from CFC.

Hang on. I only just twigged to something here.

This:
<cfobject name="acti" component="flashservice.test" >

Refers to this:
/************************************************************************/
test.asr File
/************************************************************************/
function Dequote(s)
{
var ta=s.split("'");var ret="";if(ta.length>1){ret=ta[0];for(var
i=0;i<ta.length-1;i++){ret=ret+"''"+ta[i+1];}}else{ret=s;}return ret;
}

So flashservice.test => test.asr. Which is not a component (ie: a CFC).

It it's a webservice (which it doesn't look like), then you're using the
wrong syntax. Read this:

http://livedocs.macromedia.com/coldfusion/7/htmldocs/00000307.htm

So yes - <cfobject COMPONENT="foo" name="bar"> will indeed only work for
instantiating CFCs. That's what it's for.

--
Adam

Votes

Translate

Translate

Report

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
New Here ,
Oct 24, 2006 Oct 24, 2006

Copy link to clipboard

Copied

Hi,

Ok but i have trusted with webservice option but i think it's necessary declared web service "test.asr" in Cf Admin.
I experiment this and put the result here.

The way is good.

Thanks
Seb

Votes

Translate

Translate

Report

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
New Here ,
Oct 24, 2006 Oct 24, 2006

Copy link to clipboard

Copied

LATEST
Re Hi,

It's impossible to declare a .asr as webservice.
So, I don't know how call a serverside AsctionScript service from CFC.
It's so very simple when call from Client. no différence between CFC and ASR

Seb

Votes

Translate

Translate

Report

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
Documentation