Webservice with wirebox (or coldbox)


When using wirebox to inject dependencies, how will it work with the Webservice functionality of the cfcs provided by Adobe?

When I access my following service cfc file -


As mentioned below, it suggests that the service is not configured properly. How to make it work with wirebox?

//getMyDAOName() => returns myDAOName is undefined in variables

We are trying to migrate from coldpspring which does the remote proxy beans for these service functions, is there a way to do the same in wirebox or coldbox?

I don’t really know how the remote proxy stuff in ColdSpring worked, but any time you use a CFC in which the cf engine creates the CFC instance for you, then that precludes the possibility of WireBox creating (and wiring) the CFC for you. I consider this a glaring deficiency of the CF engines as they don’t even call the init method either in these cases!

That said, you can still process autowiring on a CFC like a remote proxy. The first thing to try is simply to extend the ColdBox remote proxy CFC. It has logic in the pseduoconstructor that will attempt to autowire the CFC for you when it is created. If that doesn’t work, you can always do

application.wirebox.autoWire( this )

I never ported the ability to do remote proxies with WireBox from the ColdSpring days. I personally never like the ability to auto marshall SOAP based or REMOTE access to my service layer or object model directly.

This violated the security constructs, logging and other mechanisms that the MVC framework provided for me. Thus, I never ported that overt to WireBox.

With that said, this can be accomplished by creating a listener that on startup inspects and creates the proxies for you. We just never did create it.