Drupal Web Services - Using SOA to solve applications integrations problems. Part 1

Nowadays there's a huge need to integrate applications, systems, people... =D well people integration is other subject related to Social Networks hehehe

As part of an integration, my client requested to develop a Cake PHP application and this application needed to interact with Drupal.
Well, we are talking about the apps here, different Sessions and Domains...

At glance I was poking around with Drake http://drupal.org/projects/drake a module that dispatcher a Cake PHP app into Drupal,
unfortunately the module is a little bit old and needed some patches to run in the actual Cake PHP versions.

This looks likes a job for our friend SOA (Service-oriented architecture) http://en.wikipedia.org/wiki/Service-oriented_architecture

Hopefully I have heard about the Services module, REST Server and Json Server.
I decided to use the Services + Json Server, so let's setup things:

Scenario:

- Drupal 6xx.
Modules:
* Services
* Json Server
* Custom Service
- Cake PHP 1.3

1 - Install the following modules:
http://drupal.org/projects/services
http://drupal.org/projects/json_server

2 - Setup your API Keys: http://localhost/admin/build/services/keys/add
Note: As you know, your API Key need to have reference to your application domain.

3 - Enable the services you want to use: User Service, Node Service, etc...

4 - At this point you should have your Web Service ready to go =D let's test It:
* Go to: http://localhost/admin/build/services/browse/node.get
* Type some NID...
* Bellow you will see your data. I hope so =D

Now let's coding our Custom Service (humm...CS...Country Strike? Roger that!)