Topic: PHP SOAP Problems
Hi All,
Complete newbie here when it comes to fetching NBN data...
I'm trying to get do a GetSpeciesList request via PHP and nuSoap.
I have downloaded a new copy of nosoap and the PHP examples from MarLIN.
I have tweaked the query to include my key and declare the namespaces but just seem to get an error reply.
I have also updated the WSDL address as per the NBN site instructions.
Could anyone help?
Connection:
$client = new soapclient("http://www.nbnws.net/ws_3_5/GatewayWebService?wsdl", true);
This is my request:
$query1 = '<SpeciesListRequest registrationKey="' . $var_nbn_key . '"
        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">
        <GeographicalFilter>
            <KnownSite siteKey="1002775" providerKey="GA000339" xmlns="http://webservices.searchnbn.net/data" />
        </GeographicalFilter>
        <TaxonReportingCategoryKey>NHMSYS0000080085</TaxonReportingCategoryKey>
      </SpeciesListRequest>';
And this is the reply I am getting:
HTTP/1.1 500 Internal 
Server Error Server: Apache-Coyote/1.1 
Content-Type: text/xml;charset=utf-8 
Content-Length: 313 
Date: Wed, 05 Sep 2012 10:46:20 GMT 
Connection: close 
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope">
<faultcode>S:Client</faultcode>
<faultstring>Cannot find dispatch method for {}SpeciesListRequest</faultstring>
</S:Fault>
</S:Body>
</S:Envelope>
Any help or advice would be greatly appreciated!
Thanks,
Steve
Steve Goddard - IT Officer
Biodiversity Information Service for Powys & Brecon Beacons National Park
T: 01874 610881 - E: steve[at]b-i-s.org - W: www.b-i-s.org
