Description
-----------------------
Soap server module allows a Drupal site to access services using the same callback code.

Requirments to call services via soap server
-------------------------------------------
    - Enalbe clean URLs from Drupal site configrations.
    - Allow anonymous user to access services module from access control.


How to create client to soap server
-----------------------------------
 
 This is a simple client to call node.load from  node services

  <?php
  // Pull in the NuSOAP code
  // TODO Set the right path to nusoap.php
  require_once('../lib/nusoap.php');
  // Create the client instance
  // TODO Set the paht of wsdl
  $wsdl = "http://localhost/drupal/services/soap?wsdl";
  $client = new soapclient($wsdl);

  // Call the SOAP method

  // Set method parameters
  /*
   * node.load params are 
   *  1- nid => int
   *  2- fields => array (optional)
   *  Let we call methos twice with & without fields 
   *  then we have $param1 & $param2
   */
  //set $fields this is an optional arg
  $fields = array('nid', 'title', 'type');
  $param1 = array(
    'nid'=> 3, //Set nid
  );
  $param2 = array(
    'nid'=> 3, 
    'fields' => $fields
  );

  // First case
  echo 'Call node.load without optional params <br> 
        ------------------------------------------------------------------';
  $result = $client->__call('node.load', $param1); 
  echo '<pre>';print_r($result);echo '</pre>';
  // Second case
  echo 'Call node.load with optional params <br> 
        ---------------------------------------------------------------';
  $result = $client->__call('node.load', $param2); 
  echo '<pre>';print_r($result);echo '</pre>';
  ?>
