1

Re: Species Density Data

Hi

I would like to use the Species Density Data web service.  I have tried the example from the Request page for the web service, but nothing appears to be returned in the response.  There are no 'proper' examples it seems.  I have tried taking ideas from the SpeciesList web service examples, but still no luck.  I thought I'd try the recommended SOAPUI to test the web service and tried to import the WSDL from the NBN resources download page, but the wsdl import doesn't work (not sure whether the wsdl or SOAPUI is at fault).  Looking at the wsdl file I can't even see Species Density Data web service described anyway! 

Is anyone out there using this web service? Can someone provide an example (preferably php based)? Am I pushing water uphill here?

Thanks
Mark

2

Re: Species Density Data

Hi Mark,

that was my mistake - sorry.  I've updated the wsdl page in the help (http://www.nbn.org.uk/Guidebooks/Web-services-documentation/Resources/download-schema-xsd---wsdl-files.aspx).  It now shows you the wsdl you need to consume (v3.5) and you will get the Species Density Data web service as part of that.  It should work fine with SoapUI.

Regards, Jon

3

Re: Species Density Data

Thanks Jon.

A couple of other documentation updates needed are to the the supported web service versions and to the front page of the web services guide which lists just 14 services.

I see you've rolled lots of WSDL files in to one. Does this support digest authentication?

Jim

4

Re: Species Density Data

Hi Jim,

thanks for pointing those out Jim - we'll update them as soon as we can.

No, web services 3.5 and beyond have a new way of doing authentication - which also allows us to track usage.  You need to look at http://www.nbn.org.uk/Guidebooks/Web-services-documentation/Resources/Registration.aspx.

Cheers, Jon

5

Re: Species Density Data

Thanks Jon.

Managed to load into SoapUI successfully.  I cannot get any data out though.  I used the following request which through the web gateway does produce some records.  I tried various query parameters including date and different resolutions.  Also tried without a dataset list, but that takes ages to respond.

Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tax="http://www.nbnws.net/Taxon" xmlns:spat="http://www.nbnws.net/Spatial" xmlns:sit="http://www.nbnws.net/SiteBoundary" xmlns:map="http://www.nbnws.net/Map" xmlns:dat="http://www.nbnws.net/Dataset" xmlns:tax1="http://www.nbnws.net/TaxonReportingCategory">
   <soapenv:Header/>
   <soapenv:Body>
      <tax:SpeciesDensityDataRequest registrationKey="a45b005189e6255eecc05ac8b373adcde5bf128d">
         <spat:GeographicalFilter>
        <spat:GridSquare srs="EPSG_27700" key="NS97"/>
         </spat:GeographicalFilter> 
    <dat:DatasetList>
            <dat:DatasetKey>GA000591</dat:DatasetKey>
         </dat:DatasetList>
     <tax:TaxonVersionKeys>NBNSYS0000006434</tax:TaxonVersionKeys>
      </tax:SpeciesDensityDataRequest>
   </soapenv:Body>
</soapenv:Envelope>

Response:
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
      <ns2:SpeciesDensityDataResponse TermsAndConditions="http://data.nbn.org.uk/help/popups/generalTerms.jsp" NBNLogo="http://data.nbn.org.uk/images/NBNPower.gif" xmlns="http://www.nbnws.net/Taxon/Taxonomy" xmlns:ns2="http://www.nbnws.net/Taxon" xmlns:ns3="http://www.nbnws.net/TaxonReportingCategory" xmlns:ns4="http://www.nbnws.net/Designation" xmlns:ns5="http://www.nbnws.net/Habitat" xmlns:ns6="http://www.nbnws.net/Spatial" xmlns:ns7="http://www.nbnws.net/SiteBoundary" xmlns:ns8="http://www.nbnws.net/Dataset" xmlns:ns9="http://www.nbnws.net/Map" xmlns:ns10="http://www.nbnws.net/Metadata" xmlns:ns11="http://www.nbnws.net/" xmlns:ns12="http://www.nbnws.net/Taxon/GatewayData">
         <ns12:Header>
            <ns12:Status isError="false"/>
            <ns12:Summary>
               <ns12:DatasetCount>0</ns12:DatasetCount>
               <ns12:LocationCount>0</ns12:LocationCount>
               <ns12:RecordCount>0</ns12:RecordCount>
            </ns12:Summary>
         </ns12:Header>
         <ns2:SpeciesList>
            <ns2:Species taxonVersionKey="NBNSYS0000006434">
               <ns2:ScientificName>Apamea ophiogramma</ns2:ScientificName>
               <ns2:CommonName>Double Lobed</ns2:CommonName>
               <ns2:Authority>(Esper, 1793)</ns2:Authority>
               <ns3:TaxonReportingCategory taxonReportingCategoryKey="NHMSYS0000080073">insect - moth</ns3:TaxonReportingCategory>
            </ns2:Species>
         </ns2:SpeciesList>
         <ns12:AggregateSiteList/>
         <ns8:DatasetSummaryList/>
      </ns2:SpeciesDensityDataResponse>
   </S:Body>
</S:Envelope>