Expand my Community achievements bar.

Problem running Flex samples

Avatar

Level 3

Hello,

I'm having a problem running the Flex sample applications that come with the Solution Accelerators.  I have followed the instructions carefully, and set up both the CreateCorrespondence and ManageTemplates projects, which build successfully.

However, whenever I try and run them in the browser, they hang after the first few seconds.  When using Firebug, I see there is an AMF post to http://localhost/cmsa/messagebroker/amf, which successfully returns a status 200.  After that there is a https://localhost/cmsa/messagebroker/amfsecure post, which Firebug tells me is aborted.  Then nothing else happens.  This is the same for both the CreateCorrespondence and ManageTemplates projects.  The error in the Flex debug console is:

[RPC Fault faultString="" faultCode="Client.Error.MessageSend" faultDetail="Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'https://localhost/cmsa/messagebroker/amfsecure'"]

which makes sense if the post was aborted.

I've checked by services-config.xml file and ensured that the following line is in the channel definition:

<add-no-cache-headers>false</add-no-cache-headers>

I'm not sure where to look next - I've been googling away, but still no joy... :-(

Anyone with any ideas?

Thanks in advance,

Kristian

4 Replies

Avatar

Level 3

Hello again!

Is it actually possible to run the apps directly from the Flash Builder environment through the browser, or does it have to be built and deployed onto the LC server itself?

Cheers,

K.

Avatar

Former Community Member

By default, CM applications swfs will hit amf channels( http://localhost/cmsa/messagebroker/amf) if loaded using http protocol (for example a swf loaded using url http://localhost/cmsa/assetmanager  will try to connect at http://localhost/cmsa/messagebroker/amf).

If for some reason it, it is not able to connect to amf channel, then only it will fall back to amfsecure channel @ https://localhost/cmsa/messagebroker/amfsecure .

So it appears that there is some issue with the amf channels.

Can you provide the Charles logs?

Avatar

Former Community Member

Flex application swf can be  built either through buildscripts or via flash builder directly. But it must be deployed on the server. You must run the swf by hitting the proper url of the server http://<host>:<port>/cmsa/assetmanager.

Avatar

Level 3

Thanks for the help Dave.

I was trying to complile and run the samples without deploying them on the server first, but just in the browser in a debug session.  They run fine after deploying them. I was just trying for some shortcuts!!

Thanks again for the help, much appreciated.

Cheers,

K.