<?php    

        require('lib/nusoap.php');

        $client  = new soapclient('http://localhost/soap/books.php');
    	$result1 = $client->call('getPrice', 'Hackers guide');
    
        if (!$client->getError()) {
         
          echo " You book price is ". $result1. "<br/>"; 
        }
        else {
          echo "<h1>Error: " . $client->getError() . "</h1>";
        }
        
        $result2 = $client->call('getBookInfo', '1');
    
        if (!$client->getError()) {
         
          echo $result2["id"]." You book ".$result2["name"]." price is ". $result2["price"]."<br/>"; 
        }
        else {
          echo "<h1>Error: " . $client->getError() . "</h1>";
        }
        
        $result3 = $client->call('getFullList', 'true');
    
        if (!$client->getError()) {
	        $ii=0;
         while(count($result3)>$ii){
          echo $result3[$ii]["id"]." You book ".$result3[$ii]["name"]." price is ". $result3[$ii]["price"]."<br/>"; 
    		$ii++;
          }
          }
        else {
          echo '<h1>Error: ' . $client->getError() . '</h1>';
        }
    

   
?>