I'm trying to migrate an existing ColdFusion codebase from Adobe CF8 to OpenBD. My files include something like this:
/cfc/one.cfc
/cfc/two.cfc
/app/page.cfm
In CF8 I had a mapping from 'cfc' to '/cfc', and in page.cfm I had:
<cfajaxproxy cfc="cfc.one" jsclassname="oneCfc">
<cfajaxproxy cfc="cfc.two" jsclassname="twoCfc">
and then in Javascript I could call the CFC using:
var c = new oneCfc();
...and life was good.
Under Open BD (v2.0.3b) however, I can't seem to call the CFC functions from Javascript. The proxy is declared as before, and I can create the object in Javascript, but when I try to call a function I get the following error in my browser dev tools:
POST http://127.0.0.1:8080/app/cfc/one.cfc 404 (Not Found)
It appears to be using a relative path in Javascript when it tries to call the function, even though it's already got the object created.
The CFC is valid according to OpenBD (I can browse to ./cfc/one.cfc?wsdl
, and I can call functions on it using ./cfc/one.cfc?method=getData
etc). It doesn't seem to matter whether I have a mapping defined in OpenBD or not.
The one workaround that seems to work is having the CFC in the same function as the calling CFM file, but this isn't a very good solution when I want to reuse the CFC code from many different pages.
Has anyone got CFCs in other directories working under OpenBD?