I feel you Malik,

 

Good chance it has to do with the Destination in your RemoteObject.

 

I skipped that example though, but I will take a look at it soon.

 

In the same doc I’m getting problems with the use Event Gateway Mail Example.

 

Compiler is throwing a few errors

 

Example had

<mx:Consumer id="consumer" destination="Gateway1"

I had to change it to

<mx:Consumer id="consumer" destination="ColdFusionGateway"

To get it to compile

 

Also the producer properties

public var pro:mx.messaging.Producer;

                                   

public function initApp() {

  pro = new mx.messaging.Producer();

  pro.destination = "gateway1"; //Error, Blows up when I hit ‘Send’, Obviously Gateway1 doesn’t exist

  pro.resendAttempts = 5; //Error, Access of possibly undefined property resendAttempts through a reference with static type mx.messaging:Producer

  pro.resendInterval = 5000; //Error, Access of possibly undefined property resendInterval through a reference with static type mx.messaging:Producer

 

A weird one considering the docs say both are valid properties

I had to comment both lines out for it to compile

 

A False import

import mx.messaging.Message;

 

 

Regards,

 

Bjorn Schultheiss

Senior Flash Developer

QDC Technologies


From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of malik_robinson
Sent: Wednesday, 7 June 2006 6:20 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex/CF Tutorial PDF Posted on Adobe Site, having problem, getting errors.

 

Hi,

I am trying to use this example to get Flex 2.0 Beta 3, Mystic, and CF 7.02  to work together
but
having some problems.  If someone has a few moments to help that would be great, there is not much code to struggle through and this example is posted on the Macromedia/Adobe Site.

I am using CF 7.02 with the built in web server, Flex 2.0 Beta 3,
FDS,
with CF Extensions.

The code I am trying is here:

http://download.macromedia.com/pub/labs/flex/2/b3_usingcfwithflex_0503
.p
df.  This is posted on the Macromedia site.  Has anyone gotten this
to
work?

I am trying to follow the code in "section 1" of this PDF.

It specifically states:  "To specify a CFC to connect to, you do one
of
the following:"
  This seems to mean I can use a "Named Resource" OR
specify the full path to the cfc in the source attribute which is
what
I am trying to do. 

I know the Flex can see my CFC and that this is not a path issue or a
case where it can't find the CFC because I accidentally declared two
methods with the same name, compiled the Flex App and ran it, and it
told me that I can't declare two methods with the same name obviously.

The error I am getting when clicking "Get Secure Data" is:

[RPC Fault faultString="Didn't receive an acknowledge message"
faultCode="Server.Acknowledge.Failed" faultDetail="Was expecting
mx.messaging.messages.AcknowledgeMessage, but received null"]
 at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::fa
ul
tHandler()
 at mx.rpc::Responder/fault()
 at mx.rpc::AsyncRequest/fault()
 at ::NetConnectionMessageResponder/NetConnectionChannel.as$42:
Ne
tConnectionMessageResponder::resultHandler()
 at mx.messaging::MessageResponder/result()
 
The MXML File:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"
layout="absolute">

 <mx:Script>
  <![CDATA[
  import mx.rpc.events.ResultEvent;
  import mx.utils.ObjectUtil;
  import mx.controls.Alert;
  import mx.rpc.events.FaultEvent;
  
  private function logIn():void{
  cf.setRemoteCredentials(this.username.text,
this.password.text);
  }
  
  private function logOut():void
  {
  cf.setRemoteCredentials(null, null);
  cf.logoutuser();
  }
  
  private function getData():void
  {
  cf.getData();
  }
  
  private function serverFault(event:FaultEvent):void{
  Alert.show( ObjectUtil.toString(event.fault) );
  Alert.show( "error" );
  }
  
  private function serverResult(event:ResultEvent):void{
  Alert.show( ObjectUtil.toString(event));
  Alert.show( "success" );
  }
  ]]>
 </mx:Script>
 
 <mx:RemoteObject id="cf" destination="ColdFusion"
source="myapp.com.menu">
  <mx:method name="getData" result="serverResult
(event)" fault="serverFault(event)" />
  <mx:method name="logoutuser" />
 </mx:RemoteObject>
 
 <mx:Form x="10" y="10">
  <mx:FormItem label="username">
   <mx:TextInput id="username" text="admin"/>
  </mx:FormItem>
  <mx:FormItem label="password">
   <mx:TextInput id="password" text="adminpwd"/>
  </mx:FormItem>
  <mx:FormItem direction="horizontal">
   <mx:Button label="Login" click="logIn();"/>
   <mx:Button label="Logout" click="logOut()"/>
  </mx:FormItem>
  <mx:Button label="Get Secure Data" click="getData
();"/>
 </mx:Form>

</mx:Application>

------------------------

This seems to be a basic app.  It only has 3 files.  The mxml file, the cfc and the application.cfm file.

Can anyone try this or shed some light.  The app loads fine no errors.  I click "Login" It sets some cookie no errors at all.  I click "Logout" and it errors with : ArgumentError: Error #2004: One of the parameters is invalid.  I click "Get Secure Data" and I get the big error message I displayed above.

Any help appreciated.

Thanks,


-MR


 

__._,_.___

--
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




__,_._,___

Reply via email to