Index: soapclient.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/soapclient/Attic/soapclient.module,v
retrieving revision 1.1.4.2
diff -u -p -r1.1.4.2 soapclient.module
--- soapclient.module	12 Oct 2009 23:50:02 -0000	1.1.4.2
+++ soapclient.module	27 Nov 2009 13:04:23 -0000
@@ -872,4 +872,24 @@ function soapclient_decrypt($cipher, $ke
     }
   }
   return $pt;
-}
\ No newline at end of file
+}
+
+/**
+ * Recursively convert an object to an associative array.
+ */
+function soapclient_object_to_array($object) {
+  if (is_object($object)) {
+    $ret = (array) $object;
+  }
+  else {
+    $ret = $object;
+  }
+
+  if (is_array($ret)) {
+    foreach ($ret as $key => $value) {
+      $ret[$key] = soapclient_object_to_array($value);
+    }
+  }
+
+  return $ret;
+}
