At work we’ve started to use JBoss, writing an application in Java and AS 3.0.  We’re using Seam and Tide to sandwich it all together, and we came upon a slight problem.  Everything worked out great in the test environment, but when we went live, on an HTTPS connection, firebug was reporting that the AMF request out of flex was failing.  That’s due to the services-config.xml in the application pointing to a non-secure connection.  After much digging, we found this to be the solution.

WEB-INF/flex/services-config.xml
in the channels definition at the top:

<channels>
    <!--USED IN THE LIVE ENVIRONMENT-->
    <!--channel ref="my-graniteamf-secure"/-->
    <!--USED IN THE LOCAL/DEV ENVIRONMENT-->
    <channel ref="my-graniteamf"/>
</channels>

Then in the channel definition below we have both definitions:

<channel-definition id="my-graniteamf"
    class="mx.messaging.channels.AMFChannel">
    <endpoint
        uri="http://{server.name}:{server.port}/{context.root}/graniteamf/amf"
        class="flex.messaging.endpoints.AMFEndpoint" />
</channel-definition>
<channel-definition id="my-graniteamf-secure"
    class="mx.messaging.channels.SecureAMFChannel">
    <endpoint
        uri="https://{server.name}:443/{context.root}/graniteamf/amf"
        class="flex.messaging.endpoints.SecureAMFEndpoint" />
</channel-definition>

We couldn’t get {server.port} to work correctly, so we’re forcing the port in the address for now.

The only problem with this is you have to remember to switch the AMF channel before deploying.  It’s on our checklist before doing the full deploy, but we’re most likely going to add it to the ant task list to deploy dev, deploy live.  Something like that.

The KEY THING TO REMEMBER is this: although this file is deployed with the war/ear, it is ALSO COMPILED INTO THE APPLICATION SWF when it is built.  Make sure to change it locally and rebuild your swf before posting, or you will see no change in your app. (found this out after a significant amount of time changing the file on the server to no avail…)

(Ref: http://www.mail-archive.com/discussion@affug.com/msg00605.html)