Peter,

Thanks for taking the time to respond.

Is this correct, I need:
  1. The Services.mxml including
    1. Remove endpoint
    2. Remove source
    3. Give Named value (to match the named value in my Flex-Config and Gateway-Config)
  2. The Flex-config.xml configuration including
    1. The AMF gateway path (to point to the same path as my endpoint)
    2. The source (to point to the same path as my source as originally in services.mxml)
    3.  ID names (that match the object name in Services.mxml)
  3. A Gateway-Config with
    1. The source (to point to the same path as originally in my Source in services.mxml)
    2.  ID names (that match the object name in Flex-Config.xml)
I believe these are the only three files and the above attributes I need to alter.

I'm pretty sure my issue is not the cross-domain security file because the app works across the two ports in the one configuration (embedded paths in my SWF).


On 6/3/05, Peter Farland <[EMAIL PROTECTED]> wrote:

From my understanding, I need to do the following:

1. Alter my services.mxml and add the object names as a 'named' source

2. Alter my flex-config.xml file to add the object name as I specified
it in my Services.mxml

3. Dig into my JRun folder for CF and add the exact same names to the
gateway-config.xml

[Pete] Correct - (1.) is for cairngorm/your mxml app in general. (2.) is
to satisfy compile time validation of MXML by the flex compiler. (3.) is
to inform CFMX7 of your alias for your CFC-based service. Remember that
you don't need to use named services - it's just that they're
recommended so that the directory structure of your ColdFusion
application isn't exposed by service names (for ease-of-maintenance and
security reasons).



Is the source path going to be the same as the one I had been using for
my wildcard within the services.mxml that I am adding to my
flex-config.xml and gateway-config.xml files?

[Pete] Yes (although I believe the named service's source path to the
CFC wouldn't actually be verified/used by Flex in the case of
flex-config.xml... but it can't hurt to have it in there). The main
requirement is that ColdFusion MX 7 knows what your named service really
points to... that is, "usersService" is really an alias for
"wwwroot.MYDOMAIN.model.user.usersService" - this information is
specified in CFMX's gateway-config.xml file.



* Do I need to add a Cross-Domain Policy File?

[Pete] A crossdomain.xml policy file is something you need to consider
in general for the Flash Player when it makes HTTP based requests for
any type of resource. It is not uniquely related to RemoteObject or
NetConnection. So, if you intend to compile your Flex application as a
SWF, deploy it somewhere, then have the application contact your CFC on
potentially another server then, yes, you will need a crossdomain.xml
policy file on your ColdFusion server so that the SWF can contact it.

There's a bit more to it than that, but it is well worth the investment
spent understanding Deneb's article on this file:

http://www.macromedia.com/devnet/mx/flash/articles/fplayer_security.html


One HUGE point I can highlight that might save you some time:

1. By default the flash player looks crossdomain.xml in the webroot of
the site trying to be contacted by the flash player. In your case, this
will be the CFMX 7 server, say:

http://www.mycfserver.com:8700/crossdomain.xml

If you've deployed the CFMX7 war file with a context root other than the
default context root "" (the empty string), say, something like "/cfmx",
then you've got a few options:

a.) deploy another simple web application at the default context root to
hold crossdomain.xml

b.) change your Flex SWF to look for the policy file under your cfmx
context root (well, conceptually the player doesn't know about context
roots, so really it sees this as just some sub-path of the whole site):

System.security.loadPolicyFile("http://www.mycfserver.com:8700/cfmx/cros
sdomain.xml ");



* Should I consider  a career in something easier? Maybe truck-driving?

[Pete] The complexity largely arises from two things: a) 4 unique
technologies are being used here to support your app; b) security,
security, security. If you're wondering why you're asked to do any
particular step - let me know.


* I found a flex-config.xml file in my CF Folder for Jrun last night.
Was I just in the wrong place or does this file really exist and is it
important to this configuration?


[Pete] CFMX 7 web applications by default have their gateway-config.xml
file in the /WEB-INF directory. CFMX 7's FlashGateway servlet knows
where this file is because it is specified as a servlet init-param
"gateway.configuration.file" in /WEB-INF/web.xml

Note that you should generally expect web-applicaton specific
configuration files to live somewhere under /WEB-INF for any J2EE
web-app as the contents of this directory are not browsable.



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/







Yahoo! Groups Links

Reply via email to