Hi folks,
I just uploaded the source files for my HTTPD Communicator. It's
basically the httpxml communicator with handlers for different
protocols.
At the moment I implemented JSON (with mime text/plain as json-plain
and mime application/json as json), XML (using the code from httpxml)
and CSV (just for showing you can implement a format in a few
seconds).
If you configured the roomware server according to the config file in
the archive, you should be able to access:
http://localhost:4040/json
http://localhost:4040/json-plain
http://localhost:4040/xml
http://localhost:4040/csv
The reason for implementing it this way, is because JSON causes less
overhead and is easy to parse in AJAX applications. Having the code
for the webservice twice would be plain ugly.
Quick steps to build:
1) Follow the steps in the wiki to build roomware from source.
2) Extract the communicator (the folder structure is already inside
the tgz)
3) Adjust your config to match with the provided config (similar
config to httpxml, just different namespace)
4) Adjust your build.xml to include the new target "httpd". (just copy/
paste)
5) ant, ant install, bin/run
The current namespace is set to a personal namespace,
nl.sexybiggetje.roomware.*, because i don't have write access to make
it an "official" module. Changing the namespace is quickly done by me
or one of the current developers.
See attachment: httpd-communicator.tgz