I have two questions about setting up ColdFusion to access a remote CFC from FLEX (Flash Builder 4.5). I host several domains on my ColdFusion 8 server with IIS 6. I would like to set things up so that I can hit a CFC that is not on the same domain as my "main" coldfusion server (ColdFusion .CFM files run fine from this domain). I can't seem to do it though.
If I adjust my service control endpoint so that it USES my main coldfusion domain, it works:
_serviceControl.endpoint = "http://www.myMainColdFusionDomain.com/flex2gateway/"
but if I try a different domain, it does not work:
_serviceControl.endpoint = "http://www.notMyMainColdFusionDomain.com.com/flex2gateway/
Also, I am having trouble with putting my CFC in a subdirectory and still getting it to work. In other words, building from the above working URL, I can't seem to just add a subdirectory to the URL--it doesn't work:
_serviceControl.endpoint = "http://www.myMainColdFusionDomain.com/subDirectory/flex2gateway/"
I am sorry if what I am asking seems very basic, I am just learning.
Ok, I think worked this out for myself.
First, I adjusted my default website in IIS so that it pointed to the directory of the domain I wanted to use, that cleared up the domain issue--not really the way I thought it would be done, but it works...
Next for my directory question, I used a dot notation to indicate there is a subdirectory, and plugged it into my super class as follows:
_serviceControl.source = "subdirectory.myCFCsName";