refind.demo.TING

Photo by slashcrisis. Creative Commons Attribution-Share Alike 2.0

Photo by slashcrisis. Creative Commons Attribution-Share Alike 2.0

On May 27 the TING project announced version 0.4 Beta for their brønd.TING software (which is more or less intended to be a shared data warehouse for the Danish community libraries). The fantastic thing about this release is that they also made a search API available apparently in both SOAP/XML and REST/JSON, and with documentation. Although, I was only able to find the SOAP/XML webservice, and not the REST/JSON one, and no documentation (only five request examples).

But never mind the minor details. It was easy enough to find the WSDL file, so off I went.

At Refind we have already made a small showcase of a search interface on top of Summa, so the plan was to see how easy it would be to rip out Summa, and replace it with brønd.TING. The result of that little experiment can be seen here: Refind.demo.TING.

Read on for the exciting (somewhat technical) adventures of me getting things in place for the demo to work.

The first thing I did was naturally to try an generate some stubs based on the WSDL file. However both axis and jax-ws failed to parse the file. And since I couldn’t find out anything about the REST service, I had to figure out a way to hack around the SOAP and WSDL problems. Luckily the brønd.TING example requests were simply posted through a form, so after poking around a bit I found out that I could simple make my own SOAP Envelope and submit it to a specific url, and then I could call the search method. You might even say that it was kinda RESTy…

So now that I had figured out a way to actually interact with the service it didn’t take more than a few minutes to get a copy of the showcase website ported to this new service. A few things had to be cut along the way, such as the todo list functionality, since (as far as I can tell at least) there is no way to access individual records through brønd.TING – everything has to be done as a search, and the single records have no exposed id.

After getting both the short format and the facets up and running in the new site I started playing around with some queries, and noticed the first odd thing. The record count that the facet system returns seems to assume that query parts get AND’ed together but that default operator for searching is OR. Nothing that can’t be handled by explicitly constructing queries with AND, but for the sake of simplicity and consistency it may be worth considering changing the default to AND.

And another thing about the facet system is that the counts (even when using AND) are often a bit off. Not by much – just a few records. But it sure is confusing the heck out of me.

It is of course entirely possible that I am completely misusing the APIs and that I have totally misunderstood how the searching is supposed to work. If anyone has any experience with brønd.TING feel free to contact me.

A truly great thing about the TING project is that they have a really great policy about Open Source and Open Content. So when the 0.4 release happened I also went looking for the source – however I did not find anything. It is of course entirely possible that I just overlooked it, but for a project that has put such an emphasis on openness you would think they would make sure that their source was to find and easy to download. The release announcement said that it should be available on the wiki and in the svn repository – neither of which I could find. Perhaps it will just be made available later on? Remember “Release early, release often”.

Looking beyond the problems I have faced, the TING project does have a lot of potential – not the least of which is bringing openness and unity of data to the public libraries in Denmark.

2 Comments

  1. Hi Mads

    Great post. Fantastic to see someone poking and playing with our data. Exactly what we were hoping for 🙂

    We’ve just posted the first of some posts concerning Ding. They are going to contain the overall ideas about how we think about the coming website 🙂

    We will release the wiki (documentation) and svn (Source code), but we are just figuring out how the structure of this is going to look for brønd.TING. But in the meantime you can go to ding.gnit.dk, which is our Ding – Drupal blog. There is a page about “the entire process” and the documentation so far.
    Which means source code (Github), Wireframes, design, test site etc. etc. There is a lot of information.

    We have a testsite we’re you can see out guys working on the faceted search in our design (http://ding.signaldigital.dk/ding_ting_search_result?query=dc.creator:%22jrr%20tolkien%22#facets=dc.type:bog) based on our brønd.TING client in PHP which anybody can use and hopefulle improve (http://github.com/kdb/ting-dbc-php5-client/tree/master), which again is based on the brønd.TING REST/JSON API (http://didicas.dbc.dk/opensearch/?action=searchRequest&query=dc.title:danmark&format=dc&facets.number=10&facets.facetName=dc.creator&facetName=dc.title&outputType=json).

    I hope that answers some of you’re questions about were REST/JSON was (just add outputType=json as a parameter).

    Well that sums up some of what we have been working on. Thumbs up for the Refind.demo.TING. 🙂

  2. […] pÃ¥ ting projektet. Det viser sig at andre end mig har haft problemer med at buge webservicen : http://krakoa.dk/wordpress/2009/05/31/refindting/ . Her bemærkede jeg en kommentar der nævnte ting ogsÃ¥ kunne json , sÃ¥ jeg kastede mig ud i flg […]

Leave a Reply

*