Index: /trunk/src/VBox/Main/glue/glue-java.xsl
===================================================================
--- /trunk/src/VBox/Main/glue/glue-java.xsl	(revision 45482)
+++ /trunk/src/VBox/Main/glue/glue-java.xsl	(revision 45483)
@@ -41,5 +41,5 @@
               select="//interface[@wsmap='suppress']" />
 
-<xsl:include href="../webservice/websrv-shared.inc.xsl" />
+<xsl:include href="../idl/typemap-shared.inc.xsl" />
 
 <xsl:strip-space elements="*"/>
@@ -48,5 +48,5 @@
   <xsl:param name="name" />
   <xsl:text>/*
- *  Copyright (C) 2010-2012 Oracle Corporation
+ *  Copyright (C) 2010-2013 Oracle Corporation
  *
  *  This file is part of the VirtualBox SDK, as available from
@@ -644,5 +644,5 @@
 
   <xsl:if test="not($needlist) or not($skiplisttype='yes')">
-    <!-- look up Java type from IDL type from table array in websrv-shared.inc.xsl -->
+    <!-- look up Java type from IDL type from table array in typemap-shared.inc.xsl -->
     <xsl:variable name="javatypefield" select="exsl:node-set($G_aSharedTypes)/type[@idlname=$type]/@javaname" />
 
Index: /trunk/src/VBox/Main/idl/comimpl.xsl
===================================================================
--- /trunk/src/VBox/Main/idl/comimpl.xsl	(revision 45482)
+++ /trunk/src/VBox/Main/idl/comimpl.xsl	(revision 45483)
@@ -14,5 +14,5 @@
         Further extension to other interfaces is possible and anticipated.
 
-    Copyright (C) 2010-2012 Oracle Corporation
+    Copyright (C) 2010-2013 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
@@ -31,5 +31,5 @@
   indent="no"/>
 
-<xsl:include href="../webservice/websrv-shared.inc.xsl" />
+<xsl:include href="typemap-shared.inc.xsl" />
 
 <!-- $G_kind contains what kind of COM class implementation we generate -->
@@ -47,5 +47,5 @@
 
 /*
- * Copyright (C) 2010-2012 Oracle Corporation
+ * Copyright (C) 2010-2013 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
Index: /trunk/src/VBox/Main/idl/typemap-shared.inc.xsl
===================================================================
--- /trunk/src/VBox/Main/idl/typemap-shared.inc.xsl	(revision 45483)
+++ /trunk/src/VBox/Main/idl/typemap-shared.inc.xsl	(revision 45483)
@@ -0,0 +1,360 @@
+<!--
+    typemap-shared.inc.xsl:
+    this gets included from other XSLT stylesheets including those
+    for the webservice, so we can share some definitions that must
+    be the same for all of them (like method prefixes/suffices).
+
+    Copyright (C) 2006-2013 Oracle Corporation
+
+    This file is part of VirtualBox Open Source Edition (OSE), as
+    available from http://www.virtualbox.org. This file is free software;
+    you can redistribute it and/or modify it under the terms of the GNU
+    General Public License (GPL) as published by the Free Software
+    Foundation, in version 2 as it comes in the "COPYING" file of the
+    VirtualBox OSE distribution. VirtualBox OSE is distributed in the
+    hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
+-->
+
+
+<xsl:stylesheet
+  version="1.0"
+  targetNamespace="http://schemas.xmlsoap.org/wsdl/"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+  xmlns:vbox="http://www.virtualbox.org/">
+
+<xsl:variable name="G_xsltIncludeFilename" select="'typemap-shared.inc.xsl'" />
+
+<xsl:variable name="G_lowerCase" select="'abcdefghijklmnopqrstuvwxyz'" />
+<xsl:variable name="G_upperCase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
+
+<!-- target namespace; this must match the xmlns:vbox in stylesheet opening tags! -->
+<xsl:variable name="G_targetNamespace"
+              select='"http://www.virtualbox.org/"' />
+<xsl:variable name="G_targetNamespaceSeparator"
+              select='""' />
+
+<!-- ENCODING SCHEME
+
+    See: http://www-128.ibm.com/developerworks/webservices/library/ws-whichwsdl/
+
+    Essentially "document" style means that each SOAP message is a complete and
+    self-explanatory document that does not rely on outside information for
+    validation.
+
+    By contrast, the (older) "RPC" style allows for much shorter SOAP messages
+    that do not contain validation info like all types that are used, but then
+    again, caller and receiver must have agreed on a valid format in some other way.
+    With RPC, WSDL typically looks like this:
+
+            <message name="myMethodRequest">
+                <part name="x" type="xsd:int"/>
+                <part name="y" type="xsd:float"/>
+            </message>
+
+    This is why today "document" style is preferred. However, with document style,
+    one _cannot_ use "type" in <part> elements. Instead, one must use "element"
+    attributes that refer to <element> items in the type section. Like this:
+
+        <types>
+            <schema>
+                <element name="xElement" type="xsd:int"/>
+                <element name="yElement" type="xsd:float"/>
+            </schema>
+        </types>
+
+        <message name="myMethodRequest">
+            <part name="x" element="xElement"/>
+            <part name="y" element="yElement"/>
+        </message>
+
+    The "encoded" and "literal" sub-styles then only determine whether the
+    individual types in the soap messages carry additional information in
+    attributes. "Encoded" was only used with RPC styles, really, and even that
+    is not widely supported any more.
+
+-->
+<!-- These are the settings: all the other XSLTs react on this and are supposed
+     to be able to generate both valid RPC and document-style code. The only
+     allowed values are 'rpc' or 'document'. -->
+<xsl:variable name="G_basefmt"
+              select='"document"' />
+<xsl:variable name="G_parmfmt"
+              select='"literal"' />
+<!-- <xsl:variable name="G_basefmt"
+              select='"rpc"' />
+<xsl:variable name="G_parmfmt"
+              select='"encoded"' /> -->
+
+<!-- with document style, this is how we name the request and return element structures -->
+<xsl:variable name="G_requestElementVarName"
+              select='"req"' />
+<xsl:variable name="G_responseElementVarName"
+              select='"resp"' />
+<!-- this is how we name the result parameter in messages -->
+<xsl:variable name="G_result"
+              select='"returnval"' />
+
+<!-- we represent interface attributes by creating "get" and "set" methods; these
+     are the prefixes we use for that -->
+<xsl:variable name="G_attributeGetPrefix"
+              select='"get"' />
+<xsl:variable name="G_attributeSetPrefix"
+              select='"set"' />
+<!-- separator between class name and method/attribute name; would be "::" in C++
+     but i'm unsure whether WSDL appreciates that (WSDL only) -->
+<xsl:variable name="G_classSeparator"
+              select='"_"' />
+<!-- for each interface method, we need to create both a "request" and a "response"
+     message; these are the suffixes we append to the method names for that -->
+<xsl:variable name="G_methodRequest"
+              select='"RequestMsg"' />
+<xsl:variable name="G_methodResponse"
+              select='"ResultMsg"' />
+<!-- suffix for element declarations that describe request message parameters (WSDL only) -->
+<xsl:variable name="G_requestMessageElementSuffix"
+              select='""' />
+<!-- suffix for element declarations that describe request message parameters (WSDL only) -->
+<xsl:variable name="G_responseMessageElementSuffix"
+              select='"Response"' />
+<!-- suffix for portType names (WSDL only) -->
+<xsl:variable name="G_portTypeSuffix"
+              select='"PortType"' />
+<!-- suffix for binding names (WSDL only) -->
+<xsl:variable name="G_bindingSuffix"
+              select='"Binding"' />
+<!-- schema type to use for object references; while it is theoretically
+     possible to use a self-defined type (e.g. some vboxObjRef type that's
+     really an int), gSOAP gets a bit nasty and creates complicated structs
+     for function parameters when these types are used as output parameters.
+     So we just use "int" even though it's not as lucid.
+     One setting is for the WSDL emitter, one for the C++ emitter -->
+<!--
+<xsl:variable name="G_typeObjectRef"
+              select='"xsd:unsignedLong"' />
+<xsl:variable name="G_typeObjectRef_gsoapH"
+              select='"ULONG64"' />
+<xsl:variable name="G_typeObjectRef_CPP"
+              select='"WSDLT_ID"' />
+-->
+<xsl:variable name="G_typeObjectRef"
+              select='"xsd:string"' />
+<xsl:variable name="G_typeObjectRef_gsoapH"
+              select='"std::string"' />
+<xsl:variable name="G_typeObjectRef_CPP"
+              select='"std::string"' />
+<!-- and what to call first the object parameter -->
+<xsl:variable name="G_nameObjectRef"
+              select='"_this"' />
+<!-- gSOAP encodes underscores with USCORE so this is used in our C++ code -->
+<xsl:variable name="G_nameObjectRefEncoded"
+              select='"_USCOREthis"' />
+
+<!-- type to represent enums within C++ COM callers -->
+<xsl:variable name="G_funcPrefixInputEnumConverter"
+              select='"EnumSoap2Com_"' />
+<xsl:variable name="G_funcPrefixOutputEnumConverter"
+              select='"EnumCom2Soap_"' />
+
+<!-- type to represent structs within C++ COM callers -->
+<xsl:variable name="G_funcPrefixOutputStructConverter"
+              select='"StructCom2Soap_"' />
+
+<xsl:variable name="G_aSharedTypes">
+  <type idlname="octet"              xmlname="unsignedByte"  cname="unsigned char"    gluename="BYTE"    gluefmt="%RU8"      javaname="byte" />
+  <type idlname="boolean"            xmlname="boolean"       cname="bool"             gluename="BOOL"    gluefmt="%RTbool"   javaname="Boolean" />
+  <type idlname="short"              xmlname="short"         cname="short"            gluename="SHORT"   gluefmt="%RI16"     javaname="Short" />
+  <type idlname="unsigned short"     xmlname="unsignedShort" cname="unsigned short"   gluename="USHORT"  gluefmt="%RU16"     javaname="Integer" />
+  <type idlname="long"               xmlname="int"           cname="int"              gluename="LONG"    gluefmt="%RI32"     javaname="Integer" />
+  <type idlname="unsigned long"      xmlname="unsignedInt"   cname="unsigned int"     gluename="ULONG"   gluefmt="%RU32"     javaname="Long" />
+  <type idlname="long long"          xmlname="long"          cname="LONG64"           gluename="LONG64"  gluefmt="%RI64"     javaname="Long" />
+  <type idlname="unsigned long long" xmlname="unsignedLong"  cname="ULONG64"          gluename="ULONG64" gluefmt="%RU64"     javaname="BigInteger" />
+  <type idlname="double"             xmlname="double"        cname="double"           gluename="DOUBLE"  gluefmt="%#RX64"    javaname="Double" />
+  <type idlname="float"              xmlname="float"         cname="float"            gluename="FLOAT"   gluefmt="%#RX32"    javaname="Float" />
+  <type idlname="wstring"            xmlname="string"        cname="std::string"      gluename="BSTR"    gluefmt="%ls"       javaname="String" />
+  <type idlname="uuid"               xmlname="string"        cname="std::string"      gluename="BSTR"    gluefmt="%ls"       javaname="String" />
+  <type idlname="result"             xmlname="unsignedInt"   cname="unsigned int"     gluename="HRESULT" gluefmt="%Rhrc"     javaname="Long" />
+</xsl:variable>
+
+<!--
+    warning:
+  -->
+
+<xsl:template name="warning">
+  <xsl:param name="msg" />
+
+  <xsl:message terminate="no">
+    <xsl:value-of select="concat('[', $G_xsltFilename, '] Warning in ', $msg)" />
+  </xsl:message>
+</xsl:template>
+
+<!--
+    fatalError:
+  -->
+
+<xsl:template name="fatalError">
+  <xsl:param name="msg" />
+
+  <xsl:message terminate="yes">
+    <xsl:value-of select="concat('[', $G_xsltFilename, '] Error in ', $msg)" />
+  </xsl:message>
+</xsl:template>
+
+<!--
+    debugMsg
+    -->
+
+<xsl:template name="debugMsg">
+  <xsl:param name="msg" />
+
+  <xsl:if test="$G_argDebug">
+    <xsl:message terminate="no">
+      <xsl:value-of select="concat('[', $G_xsltFilename, '] ', $msg)" />
+    </xsl:message>
+  </xsl:if>
+</xsl:template>
+
+<!--
+    uncapitalize
+    -->
+
+<xsl:template name="uncapitalize">
+  <xsl:param name="str" select="."/>
+  <xsl:value-of select="
+        concat(
+            translate(substring($str,1,1),$G_upperCase,$G_lowerCase),
+            substring($str,2)
+        )
+  "/>
+</xsl:template>
+<!--
+    uncapitalize in the way JAX-WS understands, see #2910
+    -->
+
+<xsl:template name="uncapitalize2">
+  <xsl:param name="str" select="."/>
+  <xsl:variable name="strlen">
+    <xsl:value-of select="string-length($str)"/>
+  </xsl:variable>
+  <xsl:choose>
+    <xsl:when test="$strlen>1">
+     <xsl:choose>
+       <xsl:when test="contains($G_upperCase,substring($str,1,1))
+                       and
+                       contains($G_upperCase,substring($str,2,1))">
+         <xsl:variable name="cdr">
+           <xsl:call-template name="uncapitalize2">
+             <xsl:with-param name="str" select="substring($str,2)"/>
+           </xsl:call-template>
+         </xsl:variable>
+         <xsl:value-of select="
+           concat(
+            translate(substring($str,1,1),
+                      $G_upperCase,
+                      $G_lowerCase),
+            $cdr
+           )
+           "/>
+         </xsl:when>
+         <xsl:otherwise>
+           <!--<xsl:value-of select="concat(substring($str,1,1),$cdr)"/>-->
+           <xsl:value-of select="$str"/>
+         </xsl:otherwise>
+     </xsl:choose>
+    </xsl:when>
+    <xsl:when test="$strlen=1">
+      <xsl:value-of select="
+                            translate($str,
+                            $G_upperCase,
+                            $G_lowerCase)
+                            "/>
+    </xsl:when>
+    <xsl:otherwise>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+<!--
+    capitalize
+    -->
+
+<xsl:template name="capitalize">
+  <xsl:param name="str" select="."/>
+  <xsl:value-of select="
+        concat(
+            translate(substring($str,1,1),$G_lowerCase,$G_upperCase),
+            substring($str,2)
+        )
+  "/>
+</xsl:template>
+
+<!--
+    makeGetterName:
+    -->
+<xsl:template name="makeGetterName">
+  <xsl:param name="attrname" />
+  <xsl:variable name="capsname"><xsl:call-template name="capitalize"><xsl:with-param name="str" select="$attrname" /></xsl:call-template></xsl:variable>
+  <xsl:value-of select="concat($G_attributeGetPrefix, $capsname)" />
+</xsl:template>
+
+<!--
+    makeSetterName:
+    -->
+<xsl:template name="makeSetterName">
+  <xsl:param name="attrname" />
+  <xsl:variable name="capsname"><xsl:call-template name="capitalize"><xsl:with-param name="str" select="$attrname" /></xsl:call-template></xsl:variable>
+  <xsl:value-of select="concat($G_attributeSetPrefix, $capsname)" />
+</xsl:template>
+
+<!--
+    makeJaxwsMethod: compose idevInterfaceMethod out of IDEVInterface::method
+    -->
+<xsl:template name="makeJaxwsMethod">
+  <xsl:param name="ifname" />
+  <xsl:param name="methodname" />
+  <xsl:variable name="uncapsif"><xsl:call-template name="uncapitalize2"><xsl:with-param name="str" select="$ifname" /></xsl:call-template></xsl:variable>
+  <xsl:variable name="capsmethod"><xsl:call-template name="capitalize"><xsl:with-param name="str" select="$methodname" /></xsl:call-template></xsl:variable>
+  <xsl:value-of select="concat($uncapsif, $capsmethod)" />
+</xsl:template>
+
+
+<!--
+    makeJaxwsMethod2: compose iInterfaceMethod out of IInterface::method
+    -->
+<xsl:template name="makeJaxwsMethod2">
+  <xsl:param name="ifname" />
+  <xsl:param name="methodname" />
+  <xsl:variable name="uncapsif"><xsl:call-template name="uncapitalize"><xsl:with-param name="str" select="$ifname" /></xsl:call-template></xsl:variable>
+  <xsl:variable name="capsmethod"><xsl:call-template name="capitalize"><xsl:with-param name="str" select="$methodname" /></xsl:call-template></xsl:variable>
+  <xsl:value-of select="concat($uncapsif, $capsmethod)" />
+</xsl:template>
+
+<!--
+    emitNewline:
+    -->
+<xsl:template name="emitNewline">
+  <xsl:text>
+</xsl:text>
+</xsl:template>
+
+<!--
+    emitNewlineIndent8:
+    -->
+<xsl:template name="emitNewlineIndent8">
+  <xsl:text>
+        </xsl:text>
+</xsl:template>
+
+<!--
+    escapeUnderscores
+    -->
+<xsl:template name="escapeUnderscores">
+  <xsl:param name="string" />
+  <xsl:if test="contains($string, '_')">
+    <xsl:value-of select="substring-before($string, '_')" />_USCORE<xsl:call-template name="escapeUnderscores"><xsl:with-param name="string"><xsl:value-of select="substring-after($string, '_')" /></xsl:with-param></xsl:call-template>
+  </xsl:if>
+  <xsl:if test="not(contains($string, '_'))"><xsl:value-of select="$string" />
+  </xsl:if>
+</xsl:template>
+
+</xsl:stylesheet>
Index: /trunk/src/VBox/Main/webservice/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Main/webservice/Makefile.kmk	(revision 45482)
+++ /trunk/src/VBox/Main/webservice/Makefile.kmk	(revision 45483)
@@ -7,5 +7,5 @@
 
 #
-# Copyright (C) 2007-2012 Oracle Corporation
+# Copyright (C) 2007-2013 Oracle Corporation
 #
 # This file is part of VirtualBox Open Source Edition (OSE), as
@@ -151,4 +151,7 @@
 # The webservice location
 VBOX_PATH_WEBSERVICE          := $(PATH_SUB_CURRENT)
+
+# The IDL subdirectory (contains some XSLT files)
+VBOX_PATH_IDL                 := $(abspath $(PATH_SUB_CURRENT)/../idl)
 
 # If this is set, all webservice files are considered out-of-date every time
@@ -560,5 +563,5 @@
 
 # generate WSDL from main XIDL file
-$(VBOXWEB_WSDL): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-wsdl.xsl $(VBOX_PATH_WEBSERVICE)/websrv-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) ## @todo | $$(dir $$@)
+$(VBOXWEB_WSDL): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-wsdl.xsl $(VBOX_PATH_IDL)/typemap-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) ## @todo | $$(dir $$@)
 	$(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-wsdl.xsl)
 	$(QUIET)$(RM) -f -- $@
@@ -566,5 +569,5 @@
 	$(QUIET)$(VBOX_XSLTPROC) $(VBOXWEB_XSLTPROC_VERBOSE) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-wsdl.xsl $<
 
-$(VBOXWEBSERVICE_WSDL): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-wsdl-service.xsl $(VBOX_PATH_WEBSERVICE)/websrv-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) ## @todo | $$(dir $$@)
+$(VBOXWEBSERVICE_WSDL): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-wsdl-service.xsl $(VBOX_PATH_IDL)/typemap-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) ## @todo | $$(dir $$@)
 	$(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-wsdl-service.xsl)
 	$(QUIET)$(RM) -f -- $@
@@ -606,5 +609,5 @@
 
 # generate typemap.dat (used by wsdl2h) from main XIDL file
-$(VBOXWEB_TYPEMAP): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-typemap.xsl $(VBOX_PATH_WEBSERVICE)/websrv-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
+$(VBOXWEB_TYPEMAP): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-typemap.xsl $(VBOX_PATH_IDL)/typemap-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
 	$(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-typemap.xsl)
 	$(QUIET)$(RM) -f -- $@
@@ -612,5 +615,5 @@
 
 # generate gsoap pseudo-C header file from that WSDL; once via XSLT...
-$(VBOXWEB_GSOAPH_FROM_XSLT): $(VBOXWEB_WSDL) $(VBOX_PATH_WEBSERVICE)/websrv-wsdl2gsoapH.xsl $(VBOX_PATH_WEBSERVICE)/websrv-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
+$(VBOXWEB_GSOAPH_FROM_XSLT): $(VBOXWEB_WSDL) $(VBOX_PATH_WEBSERVICE)/websrv-wsdl2gsoapH.xsl $(VBOX_PATH_IDL)/typemap-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
 	$(call MSG_GENERATE,,$@,$(VBOXWEB_WSDL) using websrv-wsdl2gsoapH.xsl)
 	$(QUIET)$(RM) -f -- $@
@@ -618,5 +621,5 @@
 
 VBOX_NSMAP = $(VBOXWEB_OUT_DIR)/vboxwebsrv.nsmap
-$(VBOX_NSMAP): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-nsmap.xsl $(VBOX_PATH_WEBSERVICE)/websrv-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
+$(VBOX_NSMAP): $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-nsmap.xsl $(VBOX_PATH_IDL)/typemap-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
 	$(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-nsmap.xsl)
 	$(QUIET)$(RM) -f -- $@
@@ -711,5 +714,5 @@
 
 # generate method maps in server: map wsdl operations to com/xpcom method calls
-$(VBOXWEB_OUT_DIR)/methodmaps.cpp: $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-cpp.xsl $(VBOX_PATH_WEBSERVICE)/websrv-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
+$(VBOXWEB_OUT_DIR)/methodmaps.cpp: $(VBOXWEB_IDL_SRC) $(VBOX_PATH_WEBSERVICE)/websrv-cpp.xsl $(VBOX_PATH_IDL)/typemap-shared.inc.xsl $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@)
 	$(call MSG_GENERATE,,$@,$(VBOXWEB_IDL_SRC) using websrv-cpp.xsl)
 	$(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-cpp.xsl $<
Index: /trunk/src/VBox/Main/webservice/websrv-cpp.xsl
===================================================================
--- /trunk/src/VBox/Main/webservice/websrv-cpp.xsl	(revision 45482)
+++ /trunk/src/VBox/Main/webservice/websrv-cpp.xsl	(revision 45483)
@@ -40,5 +40,5 @@
 <xsl:variable name="G_xsltFilename" select="'websrv-cpp.xsl'" />
 
-<xsl:include href="websrv-shared.inc.xsl" />
+<xsl:include href="../idl/typemap-shared.inc.xsl" />
 
 <!-- collect all interfaces with "wsmap='suppress'" in a global variable for
@@ -361,5 +361,5 @@
   <xsl:param name="inptr" />          <!-- whether to add INPTR to BSTR (Dmitry template magic) -->
 
-  <!-- look up C++ glue type from IDL type from table array in websrv-shared.inc.xsl -->
+  <!-- look up C++ glue type from IDL type from table array in typemap-shared.inc.xsl -->
   <xsl:variable name="gluetypefield" select="exsl:node-set($G_aSharedTypes)/type[@idlname=$type]/@gluename" />
 
@@ -985,5 +985,5 @@
       <xsl:value-of select="'{'" />
       <xsl:call-template name="emitNewlineIndent8" />
-      <!-- look up C++ glue type from IDL type from table array in websrv-shared.inc.xsl -->
+      <!-- look up C++ glue type from IDL type from table array in typemap-shared.inc.xsl -->
       <xsl:variable name="gluetypefield" select="exsl:node-set($G_aSharedTypes)/type[@idlname=$type]/@gluename" />
       <xsl:choose>
Index: /trunk/src/VBox/Main/webservice/websrv-nsmap.xsl
===================================================================
--- /trunk/src/VBox/Main/webservice/websrv-nsmap.xsl	(revision 45482)
+++ /trunk/src/VBox/Main/webservice/websrv-nsmap.xsl	(revision 45483)
@@ -10,5 +10,5 @@
         generated for the webservice.
 
-    Copyright (C) 2006-2012 Oracle Corporation
+    Copyright (C) 2006-2013 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
@@ -36,5 +36,5 @@
 <xsl:variable name="G_xsltFilename" select="'websrv-typemap.xsl'" />
 
-<xsl:include href="websrv-shared.inc.xsl" />
+<xsl:include href="../idl/typemap-shared.inc.xsl" />
 
 <!-- - - - - - - - - - - - - - - - - - - - - - -
Index: /trunk/src/VBox/Main/webservice/websrv-php.xsl
===================================================================
--- /trunk/src/VBox/Main/webservice/websrv-php.xsl	(revision 45482)
+++ /trunk/src/VBox/Main/webservice/websrv-php.xsl	(revision 45483)
@@ -12,5 +12,5 @@
      Contributed by James Lucas (mjlucas at eng.uts.edu.au).
 
-    Copyright (C) 2008-2012 Oracle Corporation
+    Copyright (C) 2008-2013 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
@@ -30,5 +30,5 @@
   indent="no"/>
 
-<xsl:include href="websrv-shared.inc.xsl" />
+<xsl:include href="../idl/typemap-shared.inc.xsl" />
 
 <xsl:variable name="G_setSuppressedInterfaces"
@@ -361,5 +361,5 @@
 
 /*
- * Copyright (C) 2008-2012 Oracle Corporation
+ * Copyright (C) 2008-2013 Oracle Corporation
  *
  * This file is part of a free software library; you can redistribute
Index: /trunk/src/VBox/Main/webservice/websrv-python.xsl
===================================================================
--- /trunk/src/VBox/Main/webservice/websrv-python.xsl	(revision 45482)
+++ /trunk/src/VBox/Main/webservice/websrv-python.xsl	(revision 45483)
@@ -10,5 +10,5 @@
         web service API. Depends on WSDL file for actual SOAP bindings.
 
-    Copyright (C) 2008-2012 Oracle Corporation
+    Copyright (C) 2008-2013 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
@@ -28,5 +28,5 @@
   indent="no"/>
 
-<xsl:include href="websrv-shared.inc.xsl" />
+<xsl:include href="../idl/typemap-shared.inc.xsl" />
 
 <xsl:variable name="G_setSuppressedInterfaces"
Index: unk/src/VBox/Main/webservice/websrv-shared.inc.xsl
===================================================================
--- /trunk/src/VBox/Main/webservice/websrv-shared.inc.xsl	(revision 45482)
+++ 	(revision )
@@ -1,359 +1,0 @@
-<!--
-    websrv-shared.inc.xsl:
-        this gets included from the other websrv-*.xsl XSLT stylesheets
-        so we can share some definitions that must be the same for
-        all of them (like method prefixes/suffices).
-        See webservice/Makefile.kmk for an overview of all the things
-        generated for the webservice.
-
-    Copyright (C) 2006-2012 Oracle Corporation
-
-    This file is part of VirtualBox Open Source Edition (OSE), as
-    available from http://www.virtualbox.org. This file is free software;
-    you can redistribute it and/or modify it under the terms of the GNU
-    General Public License (GPL) as published by the Free Software
-    Foundation, in version 2 as it comes in the "COPYING" file of the
-    VirtualBox OSE distribution. VirtualBox OSE is distributed in the
-    hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
--->
-
-
-<xsl:stylesheet
-  version="1.0"
-  targetNamespace="http://schemas.xmlsoap.org/wsdl/"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
-  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
-  xmlns:vbox="http://www.virtualbox.org/">
-
-<xsl:variable name="G_xsltIncludeFilename" select="'websrv-shared.inc.xsl'" />
-
-<!-- target namespace; this must match the xmlns:vbox in stylesheet opening tags! -->
-<xsl:variable name="G_targetNamespace"
-              select='"http://www.virtualbox.org/"' />
-<xsl:variable name="G_targetNamespaceSeparator"
-              select='""' />
-
-<!-- ENCODING SCHEME
-
-    See: http://www-128.ibm.com/developerworks/webservices/library/ws-whichwsdl/
-
-    Essentially "document" style means that each SOAP message is a complete and
-    self-explanatory document that does not rely on outside information for
-    validation.
-
-    By contrast, the (older) "RPC" style allows for much shorter SOAP messages
-    that do not contain validation info like all types that are used, but then
-    again, caller and receiver must have agreed on a valid format in some other way.
-    With RPC, WSDL typically looks like this:
-
-            <message name="myMethodRequest">
-                <part name="x" type="xsd:int"/>
-                <part name="y" type="xsd:float"/>
-            </message>
-
-    This is why today "document" style is preferred. However, with document style,
-    one _cannot_ use "type" in <part> elements. Instead, one must use "element"
-    attributes that refer to <element> items in the type section. Like this:
-
-        <types>
-            <schema>
-                <element name="xElement" type="xsd:int"/>
-                <element name="yElement" type="xsd:float"/>
-            </schema>
-        </types>
-
-        <message name="myMethodRequest">
-            <part name="x" element="xElement"/>
-            <part name="y" element="yElement"/>
-        </message>
-
-    The "encoded" and "literal" sub-styles then only determine whether the
-    individual types in the soap messages carry additional information in
-    attributes. "Encoded" was only used with RPC styles, really, and even that
-    is not widely supported any more.
-
--->
-<!-- These are the settings: all the other XSLTs react on this and are supposed
-     to be able to generate both valid RPC and document-style code. The only
-     allowed values are 'rpc' or 'document'. -->
-<xsl:variable name="G_basefmt"
-              select='"document"' />
-<xsl:variable name="G_parmfmt"
-              select='"literal"' />
-<!-- <xsl:variable name="G_basefmt"
-              select='"rpc"' />
-<xsl:variable name="G_parmfmt"
-              select='"encoded"' /> -->
-
-<!-- with document style, this is how we name the request and return element structures -->
-<xsl:variable name="G_requestElementVarName"
-              select='"req"' />
-<xsl:variable name="G_responseElementVarName"
-              select='"resp"' />
-<!-- this is how we name the result parameter in messages -->
-<xsl:variable name="G_result"
-              select='"returnval"' />
-
-<!-- we represent interface attributes by creating "get" and "set" methods; these
-     are the prefixes we use for that -->
-<xsl:variable name="G_attributeGetPrefix"
-              select='"get"' />
-<xsl:variable name="G_attributeSetPrefix"
-              select='"set"' />
-<!-- separator between class name and method/attribute name; would be "::" in C++
-     but i'm unsure whether WSDL appreciates that (WSDL only) -->
-<xsl:variable name="G_classSeparator"
-              select='"_"' />
-<!-- for each interface method, we need to create both a "request" and a "response"
-     message; these are the suffixes we append to the method names for that -->
-<xsl:variable name="G_methodRequest"
-              select='"RequestMsg"' />
-<xsl:variable name="G_methodResponse"
-              select='"ResultMsg"' />
-<!-- suffix for element declarations that describe request message parameters (WSDL only) -->
-<xsl:variable name="G_requestMessageElementSuffix"
-              select='""' />
-<!-- suffix for element declarations that describe request message parameters (WSDL only) -->
-<xsl:variable name="G_responseMessageElementSuffix"
-              select='"Response"' />
-<!-- suffix for portType names (WSDL only) -->
-<xsl:variable name="G_portTypeSuffix"
-              select='"PortType"' />
-<!-- suffix for binding names (WSDL only) -->
-<xsl:variable name="G_bindingSuffix"
-              select='"Binding"' />
-<!-- schema type to use for object references; while it is theoretically
-     possible to use a self-defined type (e.g. some vboxObjRef type that's
-     really an int), gSOAP gets a bit nasty and creates complicated structs
-     for function parameters when these types are used as output parameters.
-     So we just use "int" even though it's not as lucid.
-     One setting is for the WSDL emitter, one for the C++ emitter -->
-<!--
-<xsl:variable name="G_typeObjectRef"
-              select='"xsd:unsignedLong"' />
-<xsl:variable name="G_typeObjectRef_gsoapH"
-              select='"ULONG64"' />
-<xsl:variable name="G_typeObjectRef_CPP"
-              select='"WSDLT_ID"' />
--->
-<xsl:variable name="G_typeObjectRef"
-              select='"xsd:string"' />
-<xsl:variable name="G_typeObjectRef_gsoapH"
-              select='"std::string"' />
-<xsl:variable name="G_typeObjectRef_CPP"
-              select='"std::string"' />
-<!-- and what to call first the object parameter -->
-<xsl:variable name="G_nameObjectRef"
-              select='"_this"' />
-<!-- gSOAP encodes underscores with USCORE so this is used in our C++ code -->
-<xsl:variable name="G_nameObjectRefEncoded"
-              select='"_USCOREthis"' />
-
-<!-- type to represent enums within C++ COM callers -->
-<xsl:variable name="G_funcPrefixInputEnumConverter"
-              select='"EnumSoap2Com_"' />
-<xsl:variable name="G_funcPrefixOutputEnumConverter"
-              select='"EnumCom2Soap_"' />
-
-<!-- type to represent structs within C++ COM callers -->
-<xsl:variable name="G_funcPrefixOutputStructConverter"
-              select='"StructCom2Soap_"' />
-
-<xsl:variable name="G_aSharedTypes">
-  <type idlname="octet"              xmlname="unsignedByte"  cname="unsigned char"    gluename="BYTE"    javaname="byte" />
-  <type idlname="boolean"            xmlname="boolean"       cname="bool"             gluename="BOOL"    javaname="Boolean" />
-  <type idlname="short"              xmlname="short"         cname="short"            gluename="SHORT"   javaname="Short" />
-  <type idlname="unsigned short"     xmlname="unsignedShort" cname="unsigned short"   gluename="USHORT"  javaname="Integer" />
-  <type idlname="long"               xmlname="int"           cname="int"              gluename="LONG"    javaname="Integer" />
-  <type idlname="unsigned long"      xmlname="unsignedInt"   cname="unsigned int"     gluename="ULONG"   javaname="Long" />
-  <type idlname="long long"          xmlname="long"          cname="LONG64"           gluename="LONG64"  javaname="Long" />
-  <type idlname="unsigned long long" xmlname="unsignedLong"  cname="ULONG64"          gluename="ULONG64" javaname="BigInteger" />
-  <type idlname="double"             xmlname="double"        cname="double"           gluename=""        javaname="Double" />
-  <type idlname="float"              xmlname="float"         cname="float"            gluename=""        javaname="Float" />
-  <type idlname="wstring"            xmlname="string"        cname="std::string"      gluename=""        javaname="String" />
-  <type idlname="uuid"               xmlname="string"        cname="std::string"      gluename=""        javaname="String" />
-  <type idlname="result"             xmlname="unsignedInt"   cname="unsigned int"     gluename="HRESULT" javaname="Long" />
-</xsl:variable>
-
-<!--
-    warning:
-  -->
-
-<xsl:template name="warning">
-  <xsl:param name="msg" />
-
-  <xsl:message terminate="no">
-    <xsl:value-of select="concat('[', $G_xsltFilename, '] Warning in ', $msg)" />
-  </xsl:message>
-</xsl:template>
-
-<!--
-    fatalError:
-  -->
-
-<xsl:template name="fatalError">
-  <xsl:param name="msg" />
-
-  <xsl:message terminate="yes">
-    <xsl:value-of select="concat('[', $G_xsltFilename, '] Error in ', $msg)" />
-  </xsl:message>
-</xsl:template>
-
-<!--
-    debugMsg
-    -->
-
-<xsl:template name="debugMsg">
-  <xsl:param name="msg" />
-
-  <xsl:if test="$G_argDebug">
-    <xsl:message terminate="no">
-      <xsl:value-of select="concat('[', $G_xsltFilename, '] ', $msg)" />
-    </xsl:message>
-  </xsl:if>
-</xsl:template>
-
-<!--
-    uncapitalize
-    -->
-
-<xsl:template name="uncapitalize">
-  <xsl:param name="str" select="."/>
-  <xsl:value-of select="
-        concat(
-            translate(substring($str,1,1),'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),
-            substring($str,2)
-        )
-  "/>
-</xsl:template>
-<!--
-    uncapitalize in the way JAX-WS understands, see #2910
-    -->
-
-<xsl:template name="uncapitalize2">
-  <xsl:param name="str" select="."/>
-  <xsl:variable name="strlen">
-    <xsl:value-of select="string-length($str)"/>
-  </xsl:variable>
-  <xsl:choose>
-    <xsl:when test="$strlen>1">
-     <xsl:choose>
-       <xsl:when test="contains('ABCDEFGHIJKLMNOPQRSTUVWXYZ',substring($str,1,1))
-                       and
-                       contains('ABCDEFGHIJKLMNOPQRSTUVWXYZ',substring($str,2,1))">
-         <xsl:variable name="cdr">
-           <xsl:call-template name="uncapitalize2">
-             <xsl:with-param name="str" select="substring($str,2)"/>
-           </xsl:call-template>
-         </xsl:variable>
-         <xsl:value-of select="
-           concat(
-            translate(substring($str,1,1),
-                      'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
-                      'abcdefghijklmnopqrstuvwxyz'),
-            $cdr
-           )
-           "/>
-         </xsl:when>
-         <xsl:otherwise>
-           <!--<xsl:value-of select="concat(substring($str,1,1),$cdr)"/>-->
-           <xsl:value-of select="$str"/>
-         </xsl:otherwise>
-     </xsl:choose>
-    </xsl:when>
-    <xsl:when test="$strlen=1">
-      <xsl:value-of select="
-                            translate($str,
-                            'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
-                            'abcdefghijklmnopqrstuvwxyz')
-                            "/>
-    </xsl:when>
-    <xsl:otherwise>
-    </xsl:otherwise>
-  </xsl:choose>
-</xsl:template>
-<!--
-    capitalize
-    -->
-
-<xsl:template name="capitalize">
-  <xsl:param name="str" select="."/>
-  <xsl:value-of select="
-        concat(
-            translate(substring($str,1,1),'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ'),
-            substring($str,2)
-        )
-  "/>
-</xsl:template>
-
-<!--
-    makeGetterName:
-    -->
-<xsl:template name="makeGetterName">
-  <xsl:param name="attrname" />
-  <xsl:variable name="capsname"><xsl:call-template name="capitalize"><xsl:with-param name="str" select="$attrname" /></xsl:call-template></xsl:variable>
-  <xsl:value-of select="concat($G_attributeGetPrefix, $capsname)" />
-</xsl:template>
-
-<!--
-    makeSetterName:
-    -->
-<xsl:template name="makeSetterName">
-  <xsl:param name="attrname" />
-  <xsl:variable name="capsname"><xsl:call-template name="capitalize"><xsl:with-param name="str" select="$attrname" /></xsl:call-template></xsl:variable>
-  <xsl:value-of select="concat($G_attributeSetPrefix, $capsname)" />
-</xsl:template>
-
-<!--
-    makeJaxwsMethod: compose idevInterfaceMethod out of IDEVInterface::method
-    -->
-<xsl:template name="makeJaxwsMethod">
-  <xsl:param name="ifname" />
-  <xsl:param name="methodname" />
-  <xsl:variable name="uncapsif"><xsl:call-template name="uncapitalize2"><xsl:with-param name="str" select="$ifname" /></xsl:call-template></xsl:variable>
-  <xsl:variable name="capsmethod"><xsl:call-template name="capitalize"><xsl:with-param name="str" select="$methodname" /></xsl:call-template></xsl:variable>
-  <xsl:value-of select="concat($uncapsif, $capsmethod)" />
-</xsl:template>
-
-
-<!--
-    makeJaxwsMethod2: compose iInterfaceMethod out of IInterface::method
-    -->
-<xsl:template name="makeJaxwsMethod2">
-  <xsl:param name="ifname" />
-  <xsl:param name="methodname" />
-  <xsl:variable name="uncapsif"><xsl:call-template name="uncapitalize"><xsl:with-param name="str" select="$ifname" /></xsl:call-template></xsl:variable>
-  <xsl:variable name="capsmethod"><xsl:call-template name="capitalize"><xsl:with-param name="str" select="$methodname" /></xsl:call-template></xsl:variable>
-  <xsl:value-of select="concat($uncapsif, $capsmethod)" />
-</xsl:template>
-
-<!--
-    emitNewline:
-    -->
-<xsl:template name="emitNewline">
-  <xsl:text>
-</xsl:text>
-</xsl:template>
-
-<!--
-    emitNewlineIndent8:
-    -->
-<xsl:template name="emitNewlineIndent8">
-  <xsl:text>
-        </xsl:text>
-</xsl:template>
-
-<!--
-    escapeUnderscores
-    -->
-<xsl:template name="escapeUnderscores">
-  <xsl:param name="string" />
-  <xsl:if test="contains($string, '_')">
-    <xsl:value-of select="substring-before($string, '_')" />_USCORE<xsl:call-template name="escapeUnderscores"><xsl:with-param name="string"><xsl:value-of select="substring-after($string, '_')" /></xsl:with-param></xsl:call-template>
-  </xsl:if>
-  <xsl:if test="not(contains($string, '_'))"><xsl:value-of select="$string" />
-  </xsl:if>
-</xsl:template>
-
-</xsl:stylesheet>
Index: /trunk/src/VBox/Main/webservice/websrv-typemap.xsl
===================================================================
--- /trunk/src/VBox/Main/webservice/websrv-typemap.xsl	(revision 45482)
+++ /trunk/src/VBox/Main/webservice/websrv-typemap.xsl	(revision 45483)
@@ -9,5 +9,5 @@
         generated for the webservice.
 
-    Copyright (C) 2006-2012 Oracle Corporation
+    Copyright (C) 2006-2013 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
@@ -35,5 +35,5 @@
 <xsl:variable name="G_xsltFilename" select="'websrv-typemap.xsl'" />
 
-<xsl:include href="websrv-shared.inc.xsl" />
+<xsl:include href="../idl/typemap-shared.inc.xsl" />
 
 <!-- - - - - - - - - - - - - - - - - - - - - - -
Index: /trunk/src/VBox/Main/webservice/websrv-wsdl-service.xsl
===================================================================
--- /trunk/src/VBox/Main/webservice/websrv-wsdl-service.xsl	(revision 45482)
+++ /trunk/src/VBox/Main/webservice/websrv-wsdl-service.xsl	(revision 45483)
@@ -10,5 +10,5 @@
         generated for the webservice.
 
-    Copyright (C) 2006-2012 Oracle Corporation
+    Copyright (C) 2006-2013 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
@@ -46,5 +46,5 @@
 <xsl:variable name="G_xsltFilename" select="'websrv-wsdl-service.xsl'" />
 
-<xsl:include href="websrv-shared.inc.xsl" />
+<xsl:include href="../idl/typemap-shared.inc.xsl" />
 
 <!-- collect all interfaces with "wsmap='suppress'" in a global variable for
Index: /trunk/src/VBox/Main/webservice/websrv-wsdl.xsl
===================================================================
--- /trunk/src/VBox/Main/webservice/websrv-wsdl.xsl	(revision 45482)
+++ /trunk/src/VBox/Main/webservice/websrv-wsdl.xsl	(revision 45483)
@@ -10,5 +10,5 @@
         generated for the webservice.
 
-    Copyright (C) 2006-2012 Oracle Corporation
+    Copyright (C) 2006-2013 Oracle Corporation
 
     This file is part of VirtualBox Open Source Edition (OSE), as
@@ -119,5 +119,5 @@
 <xsl:variable name="G_xsltFilename" select="'websrv-wsdl.xsl'" />
 
-<xsl:include href="websrv-shared.inc.xsl" />
+<xsl:include href="../idl/typemap-shared.inc.xsl" />
 
 <!-- collect all interfaces with "wsmap='suppress'" in a global variable for
@@ -148,5 +148,5 @@
   <xsl:param name="type" />
   <xsl:call-template name="debugMsg"><xsl:with-param name="msg" select="concat('......emitConvertedType: type=&quot;', $type, '&quot;')" /></xsl:call-template>
-  <!-- look up XML Schema type from IDL type from table array in websrv-shared.inc.xsl -->
+  <!-- look up XML Schema type from IDL type from table array in typemap-shared.inc.xsl -->
   <xsl:variable name="xmltypefield" select="exsl:node-set($G_aSharedTypes)/type[@idlname=$type]/@xmlname" />
   <xsl:choose>
Index: /trunk/src/VBox/Main/webservice/websrv-wsdl2gsoapH.xsl
===================================================================
--- /trunk/src/VBox/Main/webservice/websrv-wsdl2gsoapH.xsl	(revision 45482)
+++ /trunk/src/VBox/Main/webservice/websrv-wsdl2gsoapH.xsl	(revision 45483)
@@ -44,5 +44,5 @@
 <xsl:variable name="G_xsltFilename" select="'websrv-wsdl2gsoapH.xsl'" />
 
-<xsl:include href="websrv-shared.inc.xsl" />
+<xsl:include href="../idl/typemap-shared.inc.xsl" />
 
 <!-- collect all interfaces with "wsmap='suppress'" in a global variable for
