Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

[NEW PLUGIN] WS4LSQL - links and webservices

Quote Reply
[NEW PLUGIN] WS4LSQL - links and webservices
I'm pleased to announce the release of the WS4LSQL plugin.
From the WS4LSQL Homepage:

WS4LSQL 2.0 - Web Services for Links SQL
WS4LSQL 2.0 Release Candidate 1
28 October 2004

Architect: John Gotze [john@slashdemocracy.org]
Developer: Dat Tan Truong [dat@cgito.net]

This plugin was created as part of a project funded by
the National IT and Telecom Agency in Denmark. The agency
has decided to make the plugin available to others. Since
the plugin is made for a commercial product, a "real" open
source license (GPL etc) is not appropriate. Hence this:

This work is licensed under a Creative Commons License.
WS4LSQL is a plug-and-play plugin to Gossamer Threads Links SQL.

The plugin enables LSQL sites to offer a web service that allows
anyone to integrate the full content of a Links SQL site into other
applications and/or services, as well as allowing users to add links
to Links SQL via an open API based on open standards (SOAP and WSDL).

The web service attempts to follow interoperability standards,
especially the WS-I Basic Profile. Testinstallations have been
seen passing various WS-I tests. This means that the webservices can
be used by Java, .Net, and other client toolkits (Perl-based clients
included in the plugin).

The plugin requires the server it runs on to use the Perl module
SOAP::Lite, preferrably version 0.60.
A test script (test.cgi) is provided to check your server for
SOAP::Lite. Upload, chmod 755 it, and run it. It should tell you which
version of SOAP::Lite your server uses.

Needless to say, but anyway, the plugin of course requires to be
installed to a working LSQL site.

Installing the plugin
Download the plugin.
This tar-file should be uploaded and installed via the Plugin Manager.

When installing, the wizard asks which fields to include in the service.
Not all fields need be exposed.

The plugin install wizard creates all necessary files. Upon the install,
the service is enabled.

The templates wstoken_email.html and wstoken_email.txt relates to the AddLink
service and should be reviewed.

AddLink setup:
You must allow users to register for a token (automatically generated and emailed
to them). To do so, provide logged in users with a link:
<a href="http://yoursite.com/path-to-links/user.cgi?wstoken=1">Get WS - Add link token</a>
In the user template, some introduction should be provided:
"First, please obtain a token from the linksql system by signup/login. Then click on
the "get ws token link" on the page. Your token will be sent to your registered email
Second, Fill it into any requests to add a link to the WS."
or something like that...

Accessing the webservice
The WDSL file: http://yoursite.com/path-to-links/ws4lsql.wsdl
Service: WS4lsqlService
Port: WS4lsqlPort
PortType: WS4lsqlPortType

Bindings in the service are using the document literal method.

Three simple soap clients (Perl) are provided, mainly for testing:

Usage notes
The plugin and its webservice must be regarded as experimental.

The service can invoke three methods ("subservices"?):
- doLinksSearch
- GetTenNewestLinksRequest
- AddLink

The main service is doLinksSearch. This performs searches in the LSQL
database, and returns results.
The simpler GetTenNewestLinksRequest service returns the ten most
recently added links.
The AddLink service, which requires registration, is used to allow
users to add links via webservices.
More details on the site.
Quote Reply
Re: [gotze] [NEW PLUGIN] WS4LSQL - links and webservices In reply to
This looks way cool - one only has to look at the work Amazon is doing with Web services to see the possibilities.

Apologies if this is a dumb question from a non-programmer, but is it possible to use LSQL categories to limit what's exposed? For example, if I wanted to let anybody access category A but not category B?
Quote Reply
Re: [agaffin] [NEW PLUGIN] WS4LSQL - links and webservices In reply to
Thanks. I too personally also think this is a plugin with lots of potential Cool

Limiting access to certain categories is not possible out of the box, unfortunately. It should not be too difficult to add, but would need some development effort.

I should perhaps have noted that since the plugin is free, it comes with no guaranteed support and future development. It does however have some committment and usage base, and should be "alive". But for it to grow, we either need some funding or some volunteer developer time.

Since the plugin is free, I should say that users of it ought to be willing to help raising some funds for further developement. I just a few of you would be willing to chip in what equals one or two of the commercial plugins, we can take on this and several other feature requests.

If you download the plugin, please drop me a mail or a PM. There are a few small bugs that needs fixing up, and should be done over the next few days. Don't let this hold you back from using it, since upgrading should be fairly painless.