CB as SOA Platform?

I am currently prototyping a project which is a Web Services platform, for a client, providing numerous services for their many Web sites. Having used, and been very impressed with ColdBox, I am wondering how CB would work in this type of environment, with remote methods exposing services that could be consumed by a diverse mix of client (eg: PHP, ColdFusion, .Net) using XML, JSON and WDDX.

I know that CB can consume, very easily, Web Services via WSDL definitions in the configuration files. My question is if ColdBox could act as the framework for exposing a set of Web services and a data provider, and if so, the best approach to do this.

Kevin S. Anderson | President

Superlative Solutions, Inc.

Big answer: yes. I’ve had more success exposing things in a REST-like manner, or making a basic API where I’m returning JSON. Is SOAP part of your spec?

Billy Cravens

I would suggest definitely REST over SOAP services, but you can most definitely use ColdBox for this. We pretty much do this all the time with great success. To the point where we have released a new product to model RESTful services called ColdBox Relax: http://ortussolutions.com/products/relax

I encourage you to see the video, but yes, ColdBox shines in service development

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Ok. This is really frustrating, Luis. How come you keep solving my problems!!!

This looks like very great stuff. Thanks for pointing it out. Digging into it now. Without it needing to be said, I will say it anyway, “Awesome!!!”

Kevin

Hmmm… I followed the video and it was pretty impressive. Unfortunately, real life just didn’t work out as well :frowning:

First off, I installed a brand new site using the ColdBox Platform Utilities. It did not install the coldbox directory, etc., but that was ok. I just extracted from the CB Zip, and we were off and running, or so I thought. After walking through step-by-step with the video, and attempting to invoke the page, I got an ugly error stating that the canDebug() was not a valid method (this was added to the main…onRequestStart() method).

Figuring I might potentially have an out of date ColdBox zip, I downloaded the package from the CB site. Started over… (tick-tock, tick-tock)…

After a bit, I done, and quite excited to see it work, but alas, no joy. Now I get the following exception:

Element RESOURCEID is undefined in RC

This above is occurring in /modules/relax/handlers/home.cfc on line 118. In looking at the RC, there is indeed not an element named resourceId, and it appears that a default is not being set anywhere (or at least that I could find).

I’m hoping someone can give me a quick pointer on why this is happening.

Cheers!

Kevin

Kevin check if your main app is reloading the modules on each request.
If it is turn it off

Modules = { autoreload=false } or just remove it.

Hi, Luis:

Same exact problem. I’m starting to wonder if it could be something in my CF 9 configuration. The forgebox module, as an example, is totally messed up, as well. It displays a very long series of nothings (screen shot below):

Kevin

screenshot.jpg

Hi, Luis:

Same exact problem. I’m starting to wonder if it could be something in my CF 9 configuration. The forgebox module, as an example, is totally messed up, as well. It displays a very long series of nothings (screen shot below):

Kevin

Hi, Luis:

Same exact problem. I’m starting to wonder if it could be something in my CF 9 configuration. The forgebox module, as an example, is totally messed up, as well. It displays a very long series of nothings (screen shot below):

Kevin

Hi, Luis:

Same exact problem. I’m starting to wonder if it could be something in my CF 9 configuration. The forgebox module, as an example, is totally messed up, as well. It displays a very long series of nothings (screen shot below):

Kevin

Can you submit an issue for this. Thanks,

rc2 is finalized, I am just doing more testing on other platforms before I release it

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

I wish I was Ben…

Installed ColdBox from GitHub (download) as well as the coldbox-relax. Relax now works, as far as the dashboard goes, however, the LogBox portion doesn’t work at all. Clicking on the Logbox|RelaxLogs in Relax v.1.0 yields the following error:

Error Type: Autowire.AutowireException : [N/A]

Error Messages: Error autowiring modules.relax.handlers.Logs. Error constructing model: relax.logBox.logService Return type mismatch.The getLogs function does not specify the same return type in the modules.relax.model.relax.logbox.MSSQL_DAO ColdFusion component and the modules.relax.model.relax.logbox.ILogDAO

Kevin

I wish I was Ben…

Installed ColdBox from GitHub (download) as well as the coldbox-relax. Relax now works, as far as the dashboard goes, however, the LogBox portion doesn’t work at all. Clicking on the Logbox|RelaxLogs in Relax v.1.0 yields the following error:

Error Type: Autowire.AutowireException : [N/A]

Error Messages: Error autowiring modules.relax.handlers.Logs. Error constructing model: relax.logBox.logService Return type mismatch.The getLogs function does not specify the same return type in the modules.relax.model.relax.logbox.MSSQL_DAO ColdFusion component and the modules.relax.model.relax.logbox.ILogDAO

Kevin

I’ve done all of the following:

· Restarted CF 9

· Restarted Apache

· Clean project with clean install of ColdBox

· Clean install of Relax

Cleaning my gun… gonna have to put a bullet in my brainpan, I guess

That will solve my misery and yours, ha ha!

Working now on something else until I build back up my patience stock, but if you think of anything that might be contributing to this weirdness (or anyone else), some direction would be appreciated.

Kevin

I’ve done all of the following:

· Restarted CF 9

· Restarted Apache

· Clean project with clean install of ColdBox

· Clean install of Relax

Cleaning my gun… gonna have to put a bullet in my brainpan, I guess

That will solve my misery and yours, ha ha!

Working now on something else until I build back up my patience stock, but if you think of anything that might be contributing to this weirdness (or anyone else), some direction would be appreciated.

Kevin

Same error with 1.1 (after fwreinit)

I can send you a PDF of the exception if that might help.

Kevin

Ken,

I installed it on my CF9 with Apache(trying to match your config) and didn’t have any issues. Out of curiosity, do you have the 9.01 updater installed. Shouldn’t matter, but just seeing if there is a difference.

Curt

Hi, Curt:

Yes, I do have the updater installed. Out of curiosity, are you using MySQL as database or MSSQL. My backend is MSSQL 2005, and I wonder if that is the issue. Luis’ example was using MySQL. That is the only major difference I see, and the error seems to be related to the MSSQL DAO.

Kevin

The problem with forgebox here is the CF json marshalling, I fixed it
on github for final release also updated the forgebox modules.

Ok, found your problem with the MSSQL DAO implementation, I had to
change the returntype to "ANY" to match the interface instead of
query. Will commit and release 1.2