source="com.testCFC"
to
source="test.com.testCFC"
DK
On 6/1/06, Jeremy Rottman <
[EMAIL PROTECTED]> wrote:
I have a bit of time before I start working on a new project and I would like to learn how to use remote objects. I have written a really simple app that uses remote objects to call information from my cfc and display it. However everything I have tried ends up with the same error.
Bit of information, I am using the coldfusion connectivity extention for f2b, I am running the newest version of cf.
I have my local cf server running at.
C:\CFusionMX7\wwwroot
My compiled swf is in
C:\CFusionMX7\wwwroot\test
My CFC is in
C:\CFusionMX7\wwwroot\test\com
Here is my code.
ERROR THAT I GET--
(mx.rpc::Fault)#0
description = "Could not find the ColdFusion Component com.testCFC."
detail = "Please check that the given name is correct and that the component exists."
errorID = 0
faultCode = "Server.Processing"
faultcode = "Server.Processing "
faultDetail = "Please check that the given name is correct and that the component exists."
faultString = "Could not find the ColdFusion Component com.testCFC."
faultstring = "Could not find the ColdFusion Component com.testCFC."
message = "faultCode:Server.Processing faultString:'Could not find the ColdFusion Component com.testCFC.' faultDetail:'Please check that the given name is correct and that the component exists.'"
rootCause = (null)
FLEX CODE:--
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute">
<mx:RemoteObject
id="dataManager"
showBusyCursor="true"
destination="ColdFusion" source=" com.testCFC">
<mx:method name="testQuery" result="testQuery_result(dataManager.testQuery_result.result)" fault="server_fault(event)" />
</mx:RemoteObject>
<mx:Script>
<![CDATA[
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.utils.ObjectUtil ;
import mx.controls.Alert;
private function server_fault(event:FaultEvent):void
{
// dump error message
errorArea.text = ObjectUtil.toString(event.fault);
}
private function testQuery_result(result){
testDG.dataProvider = result;
}
private var _key:Object;
[Bindable]
public function get key():Object
{
return this._key;
}
public function set key(key:Object):void
{
this._key = key;
}
private function initComponent():void
{
refreshList(null);
}
public function refreshList(event:Event):void
{
this.dataManager.testQuery(this.key);
}
]]>
</mx:Script>
<mx:DataGrid id="testDG" x="10" y="20">
<mx:columns>
<mx:DataGridColumn headerText="Column 1" dataField="fld_officeId"/>
<mx:DataGridColumn headerText="Column 2" dataField="col2"/>
<mx:DataGridColumn headerText="Column 3" dataField="col3"/>
</mx:columns>
</mx:DataGrid>
<mx:Button x="320" y="19" click="initComponent()" label="Display"/>
<mx:TextArea x="10" y="170" id="errorArea" width="590" height="251"/>
</mx:Application>
CFC CODE--
<cfcomponent>
<cffunction name="testQuery" access="remote" output="false" returntype="query" >
<cfquery name="testQry" datasource="#application.dsn#">
select * from tbl_smartPanel_companyInfo
</cfquery>
<cfreturn testQry />
</cffunction>
</cfcomponent>
flex-enterprise-services FILE CODE --<?xml version="1.0" encoding="UTF-8" ?>- <service id="hs2f-service" class="flex.messaging.services.RemotingService" messageTypes="flex.messaging.messages.RemotingMessage"><adapter-definition id="cf-object" class="coldfusion.flash.messaging.ColdFusionAdapter " default="true" /></adapters><channel ref="my-cfamf" /></channels><source>*</source></properties></destination></service></services><login-command class="flex.messaging.security.JRunLoginCommand" server="JRun " /></security><endpoint uri="http://{server.name }:{server.port}{context.root}/flex2gateway/" class="flex.messaging.endpoints.AMFEndpoint" /><polling-enabled>false</polling-enabled><instantiate-types>false</instantiate-types></serialization></properties></channel-definition></channels><prefix>[Flex]</prefix><includeDate>false</includeDate><includeTime>false</includeTime><includeLevel>false</includeLevel><includeCategory>false</includeCategory></properties><pattern>Endpoint.*</pattern><pattern>Service.*</pattern><pattern>Configuration</pattern><pattern>Message.*</pattern></filters></target></logging><default-locale>en</default-locale><supported-locale>de</supported-locale><supported-locale>fr</supported-locale><supported-locale>es</supported-locale></locale><enabled>true</enabled><watch-interval>20</watch-interval><watch-file>{context.root}/WEB-INF/flex/flex-enterprise-services.xml</watch-file><touch-file>{context.root}/WEB-INF/web.xml</touch-file></redeploy></system></services-config>
--
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 .
--
Douglas Knudsen
http://www.cubicleman.com
this is my signature, like it?
--
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.

