1

Re: Is taxonomy search in WSDL?

I have just been trying to access the taxonomy search service through PHP using the following code:
<?php
//ESTABLISH SOAP CONNECTION
require_once('lib/nusoap.php');
$client = new soapclient('http://212.219.37.104/NBNWebServices/ws/WSDL', 'wsdl');
if($client->fault){
    echo "FAULT:  <p>Code: {$client->faultcode} >br />";
    echo "String: {$client->faultstring} </p>";
}

//DEFINE QUERY TO NBN GATEWAY
if($_GET[searchTerm] != '') {
    $query1 = '<TaxonomySearchRequest xmlns="http://webservices.searchnbn.net/taxonomyQuery">
        <SpeciesName xsi:type="q1:TaxonName">'.$_GET[searchTerm].'</SpeciesName>
        </TaxonomySearchRequest>';
    print $query1;
    //SEND REQUEST AND GET THE RESPONSE BACK
    $response = $client->call("GetTaxonomySearch", $query1);
    print $reponse;
} else {
    $response = '';
}
?>

but am getting absolutely nothing back. Having looked at the WSDL the GetTaxonomySearch does not appear in the file. Is this why this is not working?
Steve

2

Re: Is taxonomy search in WSDL?

Hi Steve,

I think you need to use this:

$client = new soapclient('http://212.219.37.104/NBNWebServices/ws/taxonomy/WSDL','wsdl')

The wsdl's are listed in the library (http://www.searchnbn.net/library/webservices/wsIndex.jsp) under the link 'XSD & WSDL files '.

I think the improvement of the library should be part of the consolidation of the webservices to make them easier to learn and use.

Let me know if it works (or not!).

Jon

3

Re: Is taxonomy search in WSDL?

Cheers Jon,
Thats great - just incompetence to get over now.
Steve