Posts Tagged ‘surf’

Sugar SOAP in Share

December 30, 2008

Today I have created a client for the SugarCRM web service and written a simple Share dashlet to show some information from SugarCRM. Infact it was easier than I thought to get the applications speaking with each other but during the way I also found some issues that will need a bit more investigation. More one these further below…

Basically what I did was using Axis 1.4 to generate a Java stub from the SugarCRM wsdl (I could not use CXF because SugarCRM uses RPC bindings). Axis 1.4 was also in the Alfresco libs so I used it from there, building a jar with the SugarCRM web service api. I found a pretty good guide to the SugarCRM web services here.

After that I created a webscript in Alfresco that connected to SugarCRM using the web service api. I made it simple, just logging in and retrieving some Account information from Sugar. The webscript then rendered output like this:

Accounts from SugarCRM presented by a webscript

Accounts from SugarCRM presented by a webscript

To view the same information in Share I wrote a site-webscript that basically called the accounts webscript in Alfresco and presented it as a dashlet. It looked like this:

share-integrationOne decision made here was to retrieve all information from SugarCRM through Alfresco. This means that Share will not have connector to SugarCRM but use the ‘alfresco’ connector which in turn uses the SugarCRM web services to communicate with SugarCRM. This decision was based on the following arguments:

  • Alfresco needs to access SugarCRM as well, instead of having communication spread out to both Alfresco and Share it is centralized to Alfresco.
  • Alfresco will act as the model for SugarCRM data and Share will render a view based on the output from the Alfresco webwscripts. I felt this was in line with the two-tier architecture of Share.

I would really appreciate comments on this!

Now on to a summary of the issues I have encountered today:

  1. Though creating the web service api and make some simple calls it will require some effort to write a user friendly facade around the web service.
  2. A lot of the work in Share will be about the “view”… which is not my favourite thing.
  3. The user authentication between SugarCRM and Alfresco needs be thought of a bit.
  4. It would really be nice to have some kind of tool to build Share extensions, or at least a description on a recommended project setup for such projects.
  5. I would appreciate some more samples on Share/SURF extensions than the few ones available on the wiki.

After all, the day has been very interesting and I feel this was a good end of 2008.