VirtualBox

vbox的更動 38802 路徑 trunk/src/VBox/Main/webservice


忽略:
時間撮記:
2011-9-20 下午12:07:19 (13 年 以前)
作者:
vboxsync
訊息:

Main/webservice: provide wsdl description through http get with url http://localhost:18083/?wsdl, which is what all webservices should support

位置:
trunk/src/VBox/Main/webservice
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Main/webservice/Makefile.kmk

    r38799 r38802  
    286286        vboxweb.cpp \
    287287        $(VBOXWEB_OUT_DIR)/methodmaps.cpp \
    288         $(VBOXWEB_OUT_DIR)/soapServer.cpp
     288        $(VBOXWEB_OUT_DIR)/soapServer.cpp \
     289    $(VBOXWEB_OUT_DIR)/vboxweb-wsdl.c
    289290 vboxwebsrv_CLEAN = \
    290291        $(VBOXWEB_OUT_DIR)/methodmaps.cpp \
    291         $(VBOXWEB_OUT_DIR)/soapServer.cpp
     292        $(VBOXWEB_OUT_DIR)/soapServer.cpp \
     293    $(VBOXWEB_OUT_DIR)/vboxweb-wsdl.c
    292294
    293295 vboxweb.cpp_DEFS = \
     
    686688        $(QUIET)$(VBOX_XSLTPROC) -o $@ $(VBOX_PATH_WEBSERVICE)/websrv-cpp.xsl $<
    687689
     690# generate C file which contains vboxweb.wsdl
     691$$(VBOXWEB_OUT_DIR)/vboxweb-wsdl.c: $(VBOXWEB_WSDL) $(VBOX_BIN2C)
     692        $(call MSG_TOOL,bin2c,vboxweb-wsdl,$<,$@)
     693        $(QUIET)$(VBOX_BIN2C) -export -ascii VBoxWebWSDL $< $@
     694
    688695
    689696ifdef VBOX_ONLY_SDK
  • trunk/src/VBox/Main/webservice/vboxweb.cpp

    r38636 r38802  
    6767// include generated namespaces table
    6868#include "vboxwebsrv.nsmap"
     69
     70RT_C_DECLS_BEGIN
     71
     72// declarations for the generated WSDL text
     73extern DECLIMPORT(const unsigned char) g_abVBoxWebWSDL[];
     74extern DECLIMPORT(const unsigned) g_cbVBoxWebWSDL;
     75
     76RT_C_DECLS_END
    6977
    7078/****************************************************************************
     
    289297        // make a copy of the soap struct for the new thread
    290298        m_soap = soap_copy(soap);
     299        m_soap->fget = fnHttpGet;
    291300
    292301        /* The soap.max_keep_alive value can be set to the maximum keep-alive calls allowed,
     
    316325
    317326    void process();
     327
     328    static int fnHttpGet(struct soap *soap)
     329    {
     330        char *s = strchr(soap->path, '?');
     331        if (!s || strcmp(s, "?wsdl"))
     332            return SOAP_GET_METHOD;
     333        soap_response(soap, SOAP_HTML);
     334        soap_send_raw(soap, (const char *)g_abVBoxWebWSDL, g_cbVBoxWebWSDL);
     335        soap_end_send(soap);
     336        return SOAP_OK;
     337    }
    318338
    319339    /**
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette