I have a CFC that "was" called via an API, from a ...
# cfml-general
g
I have a CFC that "was" called via an API, from a different CFML Application. 3 separate App-roots / 3 separate subdomains - handled with url-rewriting. So the caller and receiver are in separate CFML Applications. In another thread I have mentioned the issues was having with calling CFHTTP from within a function that was called via a CFHTTP call (I am getting a 403/FORBIDDEN) Which I got "around" by creating a mapping in the Lucee "Server" admin, to the receiver. So I, now, can successfully run the receivers function, as if it were "in" THIS application. Turns out - not such a rosey solution afterall. Because separately I have created another problem for myself as a result of this change. I have a method that has an argument defined as follows;
required cfc.model.myModelCFC theModel
However because of the "mapping" I created it is actually being seen / created as;
secondApp.cfc.model.modelCFC
and thus I am now getting a type mismatch error as a result of the differing "paths". Initially I thought of just removing the type from the argument... but that just feels completely wrong. And I also thought about duplicating the object in the correct namespace - but was wondering if there was a "smarter" / neater / more elegant way to go about getting
secondApp.cfc.model.myModelCFC
to be seen as an appropriate object to be passed into a method where
cfc.model.myModelCFC
Is actually what is expected? Thanks.
c
Are you allowed to make a symbolic link at the file system level? Or maybe use Git submodules? Separately, why do you specify
required cfc.model.myModelCFC theModel
instead of just
required myModelCFC theModel
and doing an import of model(s) via something like
import cfc.model.*;
in file