Thanks,

I found the issue was that the RMTP channel had a fatal exception on the
Flex server start-up.
Something about it had already been defined.

I removed the samples directory on my flex server and this time no fatal
exceptions and apps work lovely.

I think having these problems and overcoming them has given me a clear sense
of the way Producers and Consumers work with the Event Messaging Gateway.

Thanks Adobe for the bungled examples ;)

Regards,
 
Bjorn Schultheiss
Senior Flash Developer
QDC Technologies

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Peter Farland
Sent: Thursday, 8 June 2006 12:30 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Flex/CF Tutorial PDF Posted on Adobe Site, having
problem, getting errors.

If you're using Producers and Consumers to contact the messaging service
then you'll need to ensure the channel can broadcast messages to clients -
i.e. the client would need to either be statefully connected with a real
time channel such as RTMPChannel or a polling channel such as the AMFChannel
with polling-enabled set to true.


From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Steve House
Sent: Wednesday, June 07, 2006 10:11 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Flex/CF Tutorial PDF Posted on Adobe Site, having
problem, getting errors.
Have you checked on the WEB-INF\flex\flex-enterprise-services.xml file?

Specifically, look at 
--- I had to change use-mappings to true and make sure all my methods are
remote access or change this to public
<access> 
<!-- Use the ColdFusion mappings to find CFCs, by default only CFC files
under your webroot can be found. -->
 <use-mappings>true</use-mappings>
<!-- allow "public and remote" or just "remote" methods to be invoked --> 
<method-access-level>remote</method-access-level>
</access>

Secondly,
--- Here is my channels section, I think the
{server.name}:{server.port}{context.root } helps pick up non-standard ports
and context roots
<channels>
<channel-definition id="my-cfamf" class="mx.messaging.channels.AMFChannel">
<endpoint uri="http://{ server.name <http://server.name>
}:{server.port}{context.root}/flex2gateway/"
class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<polling-enabled>false</polling-enabled>
<serialization> 
<instantiate-types>false</instantiate-types>
</serialization>
</properties>
</channel-definition>
</channels>

Hope this helps,

Steve House

On 6/7/06, Bjorn Schultheiss <[EMAIL PROTECTED]> wrote: 
I can't get this CFMail example to work.
The destination totally fails for me.

Where should the destination that I use for Producer and Consumer be
defined?

I have it in,
C:\fds2\jrun4\servers\default\flex\WEB-INF\flex\flex-message-service.xml
<service>
<adapters>
<adapter-definition id="cfgateway"/>
<destination id="ColdFusionGateway">
<adapter ref="cfgateway" />

My App is running on,
http://localhost:8700/flex/waitlist/


Regards,

Bjorn Schultheiss
Senior Flash Developer
QDC Technologies

From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
[mailto: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ]
On
Behalf Of Bjorn Schultheiss
Sent: Wednesday, 7 June 2006 10:50 PM
To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
Subject: RE: [flexcoders] Flex/CF Tutorial PDF Posted on Adobe Site, having

problem, getting errors.

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%40yahoogroups.com>
[mailto: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ]
On
Behalf Of malik_robinson
Sent: Wednesday, 7 June 2006 6:20 PM
To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.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
<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





 


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Protect your PC from spy ware with award winning anti spy technology. It's free.
http://us.click.yahoo.com/97bhrC/LGxNAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~-> 

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

<<attachment: winmail.dat>>

Reply via email to