title: NuSOAP returns empty array
body: <p>I have the problem, that the NuSOAP server returns an empty array. I read and tried a lot of topics/things already but the result is always the same. I guess its only a minor thing you guys can solve within a minute.</p>
  
  <p>I want to put an array of strings containing client information into another array that holds all servers:</p>
  
  <pre><code>    Array
      (
         [Client1] =&gt; Array ([HostName] =&gt; 'TestHostName', [IP] =&gt; '1.1.1.1'),
         [Client2] =&gt; Array ([HostName] =&gt; 'TestHostName', [IP] =&gt; '2.2.2.2'),
         [Client3] =&gt; Array ([HostName] =&gt; 'TestHostName', [IP] =&gt; '3.3.3.3')
      )
  </code></pre>
  
  <p>The arrays will get filled from mysql data, but for testing purposes I created a static array with data. Here is what I have got so far:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;?php
  require_once ('lib/nusoap.php');
  require('mysql.php');
  
  $ServerName = 'server';
  $ServiceName = 'CentralConfigService';
  $ServiceURL = 'http://' . $ServerName . '/' . $ServiceName;
  
  $Server = new soap_server();
  $Server -&gt; configureWSDL($ServiceName, $ServerName . '/' . $ServiceName);
  
  function GetClientInfo($ClientName)
  {
          $Clients = array();
          $ClientInfo = array(
                          'HostName' =&gt; 'testiname',
                          'IP' =&gt; 'testip',
                          'Type' =&gt; 'testtype',
                          'Config' =&gt; 'testconfig',
                          'Routines' =&gt; 'testroutines',
                          'Files' =&gt; 'testfiles',
                          'Access' =&gt; 'testaccess');
          $Clients[$ClientName] = $ClientInfo;
          return $Clients;
  }
  
  
  $Server -&gt; wsdl -&gt; addComplexType(
          'ClientInfo',
          'complexType',
          'struct',
          'sequence',
          '',
          array(
                  'HostName' =&gt; array('name' =&gt; 'HostName', 'type' =&gt; 'xsd:string'),
                  'IP' =&gt; array('name' =&gt; 'IP', 'type' =&gt; 'xsd:string'),
                  'Type' =&gt; array('name' =&gt; 'Type', 'type' =&gt; 'xsd:string'),
                  'Config' =&gt; array('name' =&gt; 'Config', 'type' =&gt; 'xsd:string'),
                  'Routines' =&gt; array('name' =&gt; 'Routines', 'type' =&gt; 'xsd:string'),
                  'Files' =&gt; array('name' =&gt; 'Files', 'type' =&gt; 'xsd:string'),
                  'Access' =&gt; array('name' =&gt; 'Access', 'type' =&gt; 'xsd:string')
          )
  );
  
  
  $Server -&gt; wsdl -&gt; addComplexType(
          'Clients',
          'complexType',
          'array',
          '',
          'SOAP-ENC:Array',
          array(),
          array(
                  array('ref' =&gt; 'SOAP-ENC:arrayType', 'wsdl:arrayType' =&gt; 'tns:ClientInfo')
          ),
          'tns:Clients'
  );
  
  
  $Server -&gt; register(
          'GetClientInfo',
          array('HostName' =&gt; 'xsd:string'),
          array('return' =&gt; 'tns:Clients'),
          $ServiceURL,
          $ServiceURL . '#GetClientInfo',
          'rpc',
          'encoded',
          'Get config by type');
  
  
  
  if ( !isset( $HTTP_RAW_POST_DATA ) ) $HTTP_RAW_POST_DATA = file_get_contents( 'php://input' );
  
  @$Server -&gt; service($HTTP_RAW_POST_DATA);
  
  ?&gt;
  </code></pre>
  
  
  
  <p>when I call the function "GetClientInfo", I always get an empty array:</p>
  
  <pre><code>    Array
      (
      [0] =&gt; Array
      (
          [0] =&gt; Array
              (
              )
  
          [1] =&gt; Array
              (
              )
  
          [2] =&gt; Array
              (
              )
  
          [3] =&gt; Array
              (
              )
  
          [4] =&gt; Array
              (
              )
  
          [5] =&gt; Array
              (
              )
  
          [6] =&gt; Array
              (
              )
  
      )
  </code></pre>
  
  <p>)</p>
  
  <p>The client calls the function:</p>
  
  <pre><code>    &lt;?php
  
      require_once('lib/nusoap.php');
  
      $wsdl = "http://server/server.php?wsdl";
      $client = new nusoap_client($wsdl, 'wsdl');
  
      $result = $client -&gt; call('GetClientInfo', array('ClientName'=&gt;'Client1'));
      print_r($result);
  
      ?&gt;
  </code></pre>
  
  <p>Sorry for the long post. I hope it contains all necessary information.
  Thanks a lot in advance!</p>
  
  <p>Cheers,
  Daniel</p>