Index: /trunk/src/VBox/Main/webservice/websrv-php.xsl
===================================================================
--- /trunk/src/VBox/Main/webservice/websrv-php.xsl	(revision 23886)
+++ /trunk/src/VBox/Main/webservice/websrv-php.xsl	(revision 23887)
@@ -10,5 +10,5 @@
         web service API. Depends on WSDL file for actual SOAP bindings.
 
-     Copyright (C) 2008 Sun Microsystems, Inc.
+     Copyright (C) 2009 Sun Microsystems, Inc.
 
      This file is part of VirtualBox Open Source Edition (OSE), as
@@ -84,5 +84,5 @@
   <xsl:param name="attrtype" />
   <xsl:param name="attrsafearray" />
-  <xsl:variable name="fname"><xsl:call-template name="makeSetterName"><xsl:with-param name="attrname" select="$attrname"/></xsl:call-template> </xsl:variable>
+  <xsl:variable name="fname"><xsl:call-template name="makeSetterName"><xsl:with-param name="attrname" select="$attrname"/></xsl:call-template></xsl:variable>
    public function <xsl:value-of select="$fname"/>($value) {
        $request = stdClass();
@@ -102,10 +102,18 @@
    <xsl:variable name="ifname"><xsl:value-of select="@name" /></xsl:variable>
    <xsl:variable name="wsmap"><xsl:value-of select="@wsmap" /></xsl:variable>
+   <xsl:variable name="extends"><xsl:value-of select="@extends" /></xsl:variable>
    <xsl:text>
 /**
 * Generated VBoxWebService Interface Wrapper
-*/</xsl:text>
-class <xsl:value-of select="$ifname"/> extends VBox_ManagedObject
-{
+*/
+</xsl:text>
+   <xsl:choose>
+      <xsl:when test="($extends = '$unknown') or ($extends = '$dispatched') or ($extends = '$errorinfo')">
+         <xsl:value-of select="concat('class ', $ifname, ' extends VBox_ManagedObject {&#10;')" />
+      </xsl:when>
+      <xsl:when test="//interface[@name=$extends]">
+         <xsl:value-of select="concat('class ', $ifname, ' extends ', $extends, ' {&#10;')" />
+      </xsl:when>
+   </xsl:choose>
    <xsl:for-each select="method">
        <xsl:call-template name="method">
@@ -225,6 +233,5 @@
            <xsl:text>)</xsl:text>
        </xsl:if>
-       <xsl:text>;</xsl:text>
-       <xsl:text>&#10;&#10;</xsl:text>
+       <xsl:text>;&#10;</xsl:text>
 </xsl:template>
 
@@ -257,5 +264,5 @@
 
 /*
-* Copyright (C) 2008 Sun Microsystems, Inc.
+* Copyright (C) 2009 Sun Microsystems, Inc.
 *
 * This file is part of VirtualBox Open Source Edition (OSE), as
