Forum OpenACS Development: Webservice on OACS

Collapse
Posted by Iuri Sampaio on
I found a few contributions on OpenACS community regarding xmlrpc packages as well as documentation about webservice's implementation.

Getting straight to the point, I am working on a project that I need to develop a solution which in my view I could implement it as a webservice.

I believe that'd be the best way to go, but you tell me if I am on the right path. Please! :)

The scenario is simple: Two systems has to run integrated. They need to communicate a few information when some processes get executed at one side. The first side is an OACS - ]Project-Open[ box and the second is a Java ERP system.

The ]PO[ instance is the one that has to tell a few things (events) to the other (the Java instance) when some activities get executed. Briefly: weather a user 1) creates a new project; 2) opens a new task; or 3) logs hours to a task; the system has to communicate those events.

I figured that ]PO[ could do that on two forms: actively or passively.

a) as a client (actively): When those actions get executed the system calls the webservice and sends an xml with all the required info.

b) as a server (passively): when the JAVA system calls ]PO[ (asking if there are any new project or task created; or more hours logged), ]PO[ has to answer back and send an xml with the data.

I searched a bit on google and I found an interesting example, written in JAVA, that fits perfectly on what I need to implement on OpenACS/]PO[.
It's a server and a client procedures to handle the communication among the parts.
http://www.tutorialspoint.com/xml-rpc/xml_rpc_examples.htm

I also started to implement the code based on what I see at lars-blog, xml-rpc, tsoap packages and documentation.

Have I got the requirements and the scenario correctly?
Is webservice the correct approach to take?
If so, how would I do that using what we have on OpenACS?