Index: /trunk/src/VBox/Installer/freebsd/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Installer/freebsd/Makefile.kmk	(revision 61378)
+++ /trunk/src/VBox/Installer/freebsd/Makefile.kmk	(revision 61379)
@@ -208,6 +208,5 @@
 ifdef VBOX_WITH_WEBSERVICES
  VBOX_FBSD_STRIP_BIN += \
-	vboxwebsrv \
-	webtest
+	vboxwebsrv
  VBOX_FBSD_SYMLINKS += \
 	vboxwebsrv
Index: /trunk/src/VBox/Installer/freebsd/pkg_plist
===================================================================
--- /trunk/src/VBox/Installer/freebsd/pkg_plist	(revision 61378)
+++ /trunk/src/VBox/Installer/freebsd/pkg_plist	(revision 61379)
@@ -30,5 +30,4 @@
 lib/virtualbox/VBoxOGLrenderspu.so
 lib/virtualbox/vboxwebsrv
-lib/virtualbox/webtest
 lib/virtualbox/rdesktop-vrdp
 lib/virtualbox/VBoxTestOGL
Index: /trunk/src/VBox/Installer/linux/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Installer/linux/Makefile.kmk	(revision 61378)
+++ /trunk/src/VBox/Installer/linux/Makefile.kmk	(revision 61379)
@@ -338,6 +338,5 @@
 ifdef VBOX_WITH_WEBSERVICES
  VBOX_LNX_STRIP_BIN += \
- 	vboxwebsrv \
- 	webtest
+ 	vboxwebsrv
 endif
 
Index: /trunk/src/VBox/Installer/linux/debian/lintian-override.in
===================================================================
--- /trunk/src/VBox/Installer/linux/debian/lintian-override.in	(revision 61378)
+++ /trunk/src/VBox/Installer/linux/debian/lintian-override.in	(revision 61379)
@@ -116,5 +116,4 @@
 %VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/VBoxBalloonCtrl /usr/lib/virtualbox
 %VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/vboxwebsrv /usr/lib/virtualbox
-%VERPKG%: binary-or-shlib-defines-rpath ./usr/lib/virtualbox/webtest /usr/lib/virtualbox
 %VERPKG%: postrm-contains-additional-updaterc.d-calls /etc/init.d/vboxnet
 %VERPKG%: package-contains-empty-directory usr/lib/virtualbox/ExtensionPacks/
Index: /trunk/src/VBox/Installer/linux/postinst-common.sh
===================================================================
--- /trunk/src/VBox/Installer/linux/postinst-common.sh	(revision 61378)
+++ /trunk/src/VBox/Installer/linux/postinst-common.sh	(revision 61379)
@@ -89,5 +89,4 @@
         > /dev/null 2>&1
     chcon -t java_exec_t    "${MY_PATH}"/vboxwebsrv > /dev/null 2>&1
-    chcon -t java_exec_t    "${MY_PATH}"/webtest > /dev/null 2>&1
     chcon -t bin_t          "${MY_PATH}"/src/vboxhost/build_in_tmp \
          > /dev/null 2>&1
Index: /trunk/src/VBox/Installer/solaris/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Installer/solaris/Makefile.kmk	(revision 61378)
+++ /trunk/src/VBox/Installer/solaris/Makefile.kmk	(revision 61379)
@@ -517,5 +517,4 @@
 	VBoxAutostart \
 	$(if $(VBOX_WITH_WEBSERVICES),vboxwebsrv) \
-	$(if $(VBOX_WITH_WEBSERVICES),webtest) \
 	$(if $(VBOX_WITH_VBOX_IMG)$(VBOX_WITH_TESTCASES),vbox-img)
 
Index: /trunk/src/VBox/Installer/solaris/makepackage.sh
===================================================================
--- /trunk/src/VBox/Installer/solaris/makepackage.sh	(revision 61378)
+++ /trunk/src/VBox/Installer/solaris/makepackage.sh	(revision 61379)
@@ -121,5 +121,4 @@
 create_hardlink VBoxAutostart
 create_hardlink vboxwebsrv
-create_hardlink webtest
 create_hardlink VBoxZoneAccess
 create_hardlink VBoxSVC
Index: /trunk/src/VBox/Main/webservice/Makefile.kmk
===================================================================
--- /trunk/src/VBox/Main/webservice/Makefile.kmk	(revision 61378)
+++ /trunk/src/VBox/Main/webservice/Makefile.kmk	(revision 61379)
@@ -580,4 +580,15 @@
 	$(VBOXWEBSERVICE_WSDL)=>vboxwebService.wsdl
 
+ INSTALLS += vboxwebinst_webtest
+ vboxwebinst_webtest_INST = $(INST_SDK)bindings/webservice
+ vboxwebinst_webtest_MODE = a+r,u+w
+ vboxwebinst_webtest_SOURCES = \
+	$(VBOX_PATH_WEBSERVICE)/websrv-wsdl2gsoapH.xsl=>xsl/websrv-wsdl2gsoapH.xsl \
+	$(VBOX_PATH_WEBSERVICE)/websrv-nsmap.xsl=>xsl/websrv-nsmap.xsl \
+	$(VBOX_PATH_IDL)/typemap-shared.inc.xsl=>idl/typemap-shared.inc.xsl \
+	$(VBOX_PATH_WEBSERVICE)/split-soapC.cpp=>tools/split-soapC.cpp \
+	$(VBOX_PATH_WEBSERVICE)/webtest.cpp=>cpp/samples/webtest/webtest.cpp \
+	$(VBOX_PATH_WEBSERVICE)/Makefile.webtest=>cpp/samples/webtest/Makefile
+
 endif # VBOX_ONLY_SDK
 
Index: /trunk/src/VBox/Main/webservice/Makefile.webtest
===================================================================
--- /trunk/src/VBox/Main/webservice/Makefile.webtest	(revision 61379)
+++ /trunk/src/VBox/Main/webservice/Makefile.webtest	(revision 61379)
@@ -0,0 +1,78 @@
+#
+# Copyright (C) 2016 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.
+#
+
+XSLTPROC          = xsltproc
+ifeq ($(PATH_GSOAP),)
+ PATH_GSOAP       = $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS)/common/gsoap/*)))
+endif
+PATH_GSOAP_BIN   := $(strip $(PATH_GSOAP))
+ifeq ($(PATH_GSOAP_BIN),)
+ PATH_GSOAP_BIN = /usr/bin
+endif
+SOAPCPP2          = $(PATH_GSOAP_BIN)/soapcpp2
+
+ifneq ($(MAKECMDGOALS),clean)
+ ifeq ($(wildcard $(PATH_GSOAP)/stdsoap2.cpp),)
+ $(error Fix PATH_GSOAP!)
+ endif
+endif
+
+WEBSRVWSDL2GSOAPH = ../../../xsl/websrv-wsdl2gsoapH.xsl
+WEBSRVNSMAPXSL    = ../../../xsl/websrv-nsmap.xsl
+VBOXWEBIDLSRC     = ../../../../VirtualBox.xidl
+VBOXWEBWSDL       = ../../../vboxweb.wsdl
+SPLITSOAPCCPP     = ../../../tools/split-soapC.cpp
+SOAPCCPP          = $(foreach num,1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20,soapC-$(num).cpp)
+SOAPCO            = $(patsubst %.cpp,%.o,$(SOAPCCPP))
+
+webtest: webtest.o soapClient.o $(SOAPCO) stdsoap2.o
+	$(CXX) -O2 -o $@ $^ -lssl -lcrypto
+
+webtest.o: webtest.cpp soapC.cpp vboxwebsrv.nsmap
+	$(CXX) -O2 -DWITH_OPENSSL -c -o $@ $< -I$(PATH_GSOAP)
+
+soapClient.o: soapC.cpp
+	$(CXX) -O2 -c -o $@ soapClient.cpp -I$(PATH_GSOAP)
+
+$(SOAPCO): soapC-%.o: soapC-%.cpp
+	$(CXX) -O0 -c -o $@ $< -I$(PATH_GSOAP)
+
+soapC.cpp: gsoapH_from_xslt.h
+	$(SOAPCPP2) -x -L -2 -w -I$(PATH_GSOAP)/import $^
+
+stdsoap2.o: $(PATH_GSOAP)/stdsoap2.cpp
+	$(CXX) -O2 -DWITH_OPENSSL -c -o $@ $<
+
+gsoapH_from_xslt.h:
+	$(XSLTPROC) -o $@ $(WEBSRVWSDL2GSOAPH) $(VBOXWEBWSDL)
+
+vboxwebsrv.nsmap: 
+	$(XSLTPROC) -o $@ $(WEBSRVNSMAPXSL) $(VBOXWEBIDLSRC)
+
+$(subst soapC,%,$(SOAPCCPP)): split-soapC %.cpp
+	./split-soapC soapC.cpp . 20
+
+split-soapC: $(SPLITSOAPCCPP)
+	$(CXX) -O2 -o $@ $<
+
+.PHONY: clean
+clean:
+	rm -f gsoapH_from_xslt.h
+	rm -f soapStub.h soapServer.cpp soapC.cpp soapClient.cpp
+	rm -f soapH.h soapvboxBindingObject.h soapvboxBindingProxy.h
+	rm -f vboxBinding.nsmap
+	rm -f vboxwebsrv.nsmap
+	rm -f split-soapC
+	rm -f $(SOAPCCPP) $(SOAPCO)
+	rm -f soapClient.o stdsoap2.o
+	rm -f webtest.o webtest
+	rm -f soapC-split-done
