title: How to set these complex types in ZEND SOAP AutoDiscovery?
body: <p>Hello I need to write a SOAP server, where I would be able to pass complex types, structuraly that would look like this:</p>
  
  <pre><code>&lt;ParcelDetails&gt;
    &lt;countryType&gt;&lt;/countryType&gt;
    &lt;addressType&gt;
      &lt;countryType&gt;&lt;/countryType&gt;
        .... .....
        .... ....
  
      &lt;contact&gt;&lt;/contact&gt;
    &lt;/addressType&gt;
  &lt;ParcelDetails&gt;
  </code></pre>
  
  <p>and I/m using following code to generate WSDL file for this service</p>
  
  <pre><code>&lt;?php
  include_once("Zend/Soap/Wsdl/Strategy/ArrayOfTypeSequence.php");
  include_once("Zend/Soap/Wsdl/Strategy/DefaultComplexType.php");
  include_once("Zend/Soap/Wsdl/Strategy/Composite.php");
  include_once("Zend/Soap/Wsdl/Strategy/ArrayOfTypeComplex.php");
  include_once("Zend/Soap/Wsdl/Strategy/AnyType.php");
  include_once('Zend/Soap/AutoDiscover.php');
  
  include_once('Zend/Soap/Server.php');
  include_once('Zend/Soap/Client.php');
  include_once('Zend/Soap/Wsdl.php');
  
  //*************************************
  // Classes used by getGroup service method below 
  
  class countryTypeSpace
  {
      /** @var country */
      public $country = '';
  }
  
  class addressTypeSpace
  {
      /** @var countryType */
      public $countryType = '';
  
      ....
  
      /** @var contact */
      public $contact = '';
  
  }
  
  
  
  class ParcelDetailsSpace
  {
  
      /** @var countryType */
      public $countryType;
  
      /** @var addressType[]  */
      public $addressType;
  
  }
  
  //*************************************
  
  class ServiceClass  
  {
      /**
       *  ParcelDetails
       */
      public function registerParcel( $username, $pasword) {
  
          $group = new ParcelDetailsSpace();
  
          //fill in the array
          for ($i = 1; $i &lt;= 3; $i++) {
              $countryType = new countryType();
              $countryType-&gt;country = 'country';
  
              $addressType = new addressTypeSpace();
              $addressType-&gt;address = 'Adresas';
              $addressType-&gt;area = 'Area';
  
  
              $group-&gt;countryType = $countryType;
              $group-&gt;addressType = $addressType;
          }
  
          return $group;
      }       
  }
  
  
  if(isset($_GET['wsdl'])) {
      $autodiscover = new Zend_Soap_AutoDiscover('Zend_Soap_Wsdl_Strategy_AnyType');
      $autodiscover-&gt;setClass('ServiceClass');
      $autodiscover-&gt;handle();
  } else {
      $soap = new Zend_Soap_Server("http://localhost/zs/zserverComplex.php?wsdl");
      $soap-&gt;setClass('ServiceClass');
      $soap-&gt;handle();
  }
  
  ?&gt;
  </code></pre>
  
  <p>on the client end I'm getting an error: </p>
  
  <pre><code> Fatal error: Uncaught SoapFault exception: [VersionMismatch] Wrong
   Version in C:\Program Files
   (x86)\EasyPHP-5.3.8.0\www\zs\Zend\Soap\Client.php:1121 Stack trace:
  
  # 0 C:\Program Files
   (x86)\EasyPHP-5.3.8.0\www\zs\Zend\Soap\Client.php(1121):
   SoapClient-&gt;__soapCall('registerParcel', Array, NULL, NULL, Array) 
  
  # 1 C:\Program Files (x86)\EasyPHP-5.3.8.0\www\zs\zclientDpd.php(6):
   Zend_Soap_Client-&gt;__call('registerParcel', Array) 
  
  #2 C:\Program Files
   (x86)\EasyPHP-5.3.8.0\www\zs\zclientDpd.php(6):
   Zend_Soap_Client-&gt;registerParcel(Array) 
  
  #3 {main} thrown in C:\Program Files
  (x86)\EasyPHP-5.3.8.0\www\zs\Zend\Soap\Client.php on line 1121
  </code></pre>
  
  <p>I'v tried different Zend_Soap_Wsdl_Strategy strategies as you might see from includes at the top of my server file, but no success at all
  I know that probably I'm missing something, but I'm not sure where to look...</p>
  
  <p>I would be glad if someone would be able to point me to the right direction, about these complex types and auto discovery, at least, if not the right answer to this problem</p>
  
  <p>Because I couldnt get any good info on this</p>
  
  <p>Thank you in advance</p>