Topic: NBN Web Services

I received the following from Dave Slade at SEWBReC, and as he seemed to make a good point that will strike a chord with many LRCs, I though I should post it here:

"I would like to integrate NBN Gateway web services into the existing search systems we have developed. I know that the technology is there, I just have not had time to work out how to make use of it. The current documentation is all well and good, but my programming technique comes from seeing code that someone else has written to do a job and tailoring it to suit my needs. Perhaps what I really want is a repository of program code that people have developed in different languages for specific uses?"

As anyone integrated web services into their systems, and would they like to share their experience here?

Thanks,

Tom Hunt - ALERC National Coordinator

Re: NBN Web Services

Dan Jones (Humber EDC) developed a web based system that pulls in data from the NBN Gateway & database.

Charlie Barnes
Information Officer
Greater Lincolnshire Nature Partnership

Re: NBN Web Services

I too need to see examples rather than complex documentation. I though NE had paid for examples to be made avaialable but don't think I ever saw them, have any of you?\

Tony Price
Data Manager, Somerset Environmental Records Centre (SERC)

Re: NBN Web Services

We've recently done this at Merseyside BioBank so that we now produce reports for consultants which integrate records from our R6 DB with records pulled back ('live') from the NBN Gateway via web services.

There are two technical aspects to this:

1. Producing the code (in our case VB.net code) to use the Gateway services and pull back the data; and
2. Processing, filtering, enriching these data; integrating them with those from our R6 database; and presenting them together in a report.

In our experience, the second of these is by far the most challenging task and there are many, many, more lines of code around that aspect than around the first. The second is also intimately associated with the way we do things here at MBB - the format of the reports we produce etc (our reports are produced by the VB program which interfaces with MS Word).

The first may be more general and I would be happy to pull out the relevant VB.net sub-routine that does that and share it if it is of any use.

Rich

Richard Burkmar
Merseyside BioBank LRC

Re: NBN Web Services

burkmarr wrote:

The first may be more general and I would be happy to pull out the relevant VB.net sub-routine that does that and share it if it is of any use.

Rich

Yes Please

Tony Price
Data Manager, Somerset Environmental Records Centre (SERC)

Re: NBN Web Services

Ditto.

It would be great to have an online repository of code routines/functions/snippets that could just serve as inspiration and starting points for local projects. Pretty much all the coding I've done in my LRC life has been essentially adapting/extending/translating other peoples' code to work locally. Unfortunately I don't have the time or skills to start things from scratch!

Teresa Frost
WeBS National Organiser, BTO. NFBR Council Member.
ex-ALERC/CBDC/KMBRC

Re: NBN Web Services

What's the best way to do it? Post a file somewhere on this forum?

Richard Burkmar
Merseyside BioBank LRC

Re: NBN Web Services

Can we post files on the forum?  If not it would be good if we could.

Tom Hunt - ALERC National Coordinator

Re: NBN Web Services

We can't very easily unfortunately - I have put files on here (in that bit in the top menu that says "alerc files") but I can't do it from my work computer, and it is not something non-forum admins can do. It was just a temporary solution while the website was being developed really.

I suppose since it is just text we could have a forum thread, but it might get a bit unmanageable and hard to find stuff. Perhaps Charles R might have some ideas of a solution? I guess a wiki could work? (Craig??)

Teresa Frost
WeBS National Organiser, BTO. NFBR Council Member.
ex-ALERC/CBDC/KMBRC

Re: NBN Web Services

Okay I've produced a short, no frills, demonstration project for VB.net 2008 which demonstrates the NBN Gateway One Site Data web service. It works by reading a text file containing easting/northing pairs (an example is included) and then using this as a geographic filter on the one site service. This project is complete, so all you need to try it out is the free VB.net express (2008 but should be okay in 2010) on your computer.

The code is lightly commented, but I hope enough for you to work out what's happening. It does a lot of XML parsing of course, since that is what the response from a web service is delivered as.

I uploaded it to the NBN forum: http://forums.nbn.org.uk/uploads.php?fi … oForVB.zip

Have fun!

Richard Burkmar
Merseyside BioBank LRC

Re: NBN Web Services

Thanks Richard. I don't want to have to install VB.net express but would like to inspect the code - in what file is the meat of the code located? I've opened a few and they either seem to be blank or boilerplate stuff.

Re: NBN Web Services

Hi Charles. Form1.vb is the one you need (in 'NBNWebServiceDemo\NBNWebServiceDemo').

Rich

Richard Burkmar
Merseyside BioBank LRC

Re: NBN Web Services

Thanks for the code. I've converted it for Visual Studio 2010 without out problems. By way of a thank you and to fill a hole I have created an app today to create the search file like the one you provided. It's for MapInfo and you just have to select a polygon and run the app. It's a little quick and dirty but I've tried it and it does seem to work.

NBNSearchBoundary.MBX

Let me know if there are issues.

Tony

Tony Price
Data Manager, Somerset Environmental Records Centre (SERC)

Re: NBN Web Services

Nice one Tony.

Rich

Richard Burkmar
Merseyside BioBank LRC

Re: NBN Web Services

Only last week I was looking at embedding MapInfo in to a dot net app and this code and the bit I just did would be very useful together for data searches. I was looking at the list of datasets available to us and seeing about making a filter to pull of only data from selected datasets as appropriate and also looking to adding in filters for species with specific status. It shouldn't be too hard to do.

Tony Price
Data Manager, Somerset Environmental Records Centre (SERC)