Ok, I'm finally at that point. I've been working with ColdBox for the
last 3-4 months and am getting very comfortable with it. I'm finally
at the point in the game where I need to start exposing certain parts
as a webservice.
After doing some research it looks like using the coldboxproxy.cfc
will handle that just fine. Now, correct me if I'm wrong, but it
looks like ANY event could be executed using the proxy. Is there any
way I can only expose CERTAIN events? Should I just condition the
process method to only call a series of events?
Any other suggestions would be greatly appreciated!
Do not expose the process method as a webservice. That is there for sample purposes. Your proxy objects, should have concrete methods that firmly delineate your API, with strong typed arguments. Then inside of these proxy methods is where you will use the process() method to turn around and proxy the request.
Also, I recommend looking at RESTful webservices. ColdBox plays better with RESTful webservices as you have control of data marshalling, ses, logging, etc.
All my new apps, I create RESTful webservices instead of SOAP.
Awesome to know! So what you're saying is just to set the process to
a private method and create some tightly constructed public methods
(or would it be remote since its a ws?) to get the data I need from my
models, etc.?
It seems getting data isn't going to be too terrible. Any problems
with posting stuff back? Obviously...again...strong typed arguments
and a lot of checking and double checking.