diff --git a/src/WSDL/XML/SOAPGenerator.php b/src/WSDL/XML/SOAPGenerator.php
index <HASH>..<HASH> 100644
--- a/src/WSDL/XML/SOAPGenerator.php
+++ b/src/WSDL/XML/SOAPGenerator.php
@@ -53,7 +53,7 @@ class SOAPGenerator
             }
             if ($type instanceof Object) {
                 $element = $DOMDocument->createElement($type->getName());
-                foreach ($type->getComplexType()->getComplexType() as $complexType) {
+                foreach ($type->getComplexType() as $complexType) {
                     $el = $DOMDocument->createElement($complexType->getName(), '?');
                     $element->appendChild($el);
                 }
@@ -67,4 +67,4 @@ class SOAPGenerator
 
         return $DOMDocument->saveXML();
     }
-}
\ No newline at end of file
+}
Update SOAPGenerator.php

Call to a member function getComplexType() on a non-object