正在显示
7 个修改的文件
包含
18 行增加
和
12 行删除
@@ -5,8 +5,8 @@ SET(CMAKE_BUILD_TYPE Debug CACHE STRING "Build type" FORCE) | @@ -5,8 +5,8 @@ SET(CMAKE_BUILD_TYPE Debug CACHE STRING "Build type" FORCE) | ||
5 | 5 | ||
6 | ############################################################# | 6 | ############################################################# |
7 | # Project and version | 7 | # Project and version |
8 | -SET(CPACK_PACKAGE_VERSION_MAJOR "3") | ||
9 | -SET(CPACK_PACKAGE_VERSION_MINOR "0") | 8 | +SET(CPACK_PACKAGE_VERSION_MAJOR "4") |
9 | +SET(CPACK_PACKAGE_VERSION_MINOR "1") | ||
10 | SET(CPACK_PACKAGE_VERSION_PATCH "0") | 10 | SET(CPACK_PACKAGE_VERSION_PATCH "0") |
11 | SET(COMPLETE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}) | 11 | SET(COMPLETE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}) |
12 | SET(RELEASE_NAME "Master") | 12 | SET(RELEASE_NAME "Master") |
@@ -41,6 +41,7 @@ class DebugFilter(DmpServerFilter): | @@ -41,6 +41,7 @@ class DebugFilter(DmpServerFilter): | ||
41 | headers_dict = handler.request_headers() | 41 | headers_dict = handler.request_headers() |
42 | handler.clear() | 42 | handler.clear() |
43 | handler.set_response_header('Status', '200 Ok') | 43 | handler.set_response_header('Status', '200 Ok') |
44 | + # handler.set_response_header("Content-Type", "text/html;charset=utf-8"); | ||
44 | handler.append_body(b'<h1>Params</h1>') | 45 | handler.append_body(b'<h1>Params</h1>') |
45 | for param in params: | 46 | for param in params: |
46 | handler.append_body(('<p><b>%s</b> "%s"</p>' % (param.key(), param.data())).encode('utf8')) | 47 | handler.append_body(('<p><b>%s</b> "%s"</p>' % (param.key(), param.data())).encode('utf8')) |
@@ -43,7 +43,7 @@ void DmpFilterResponseDecorator::start() | @@ -43,7 +43,7 @@ void DmpFilterResponseDecorator::start() | ||
43 | DmpServerFiltersMap::const_iterator filtersIterator; | 43 | DmpServerFiltersMap::const_iterator filtersIterator; |
44 | for (filtersIterator = filters_.begin(); filtersIterator != filters_.end(); ++filtersIterator) | 44 | for (filtersIterator = filters_.begin(); filtersIterator != filters_.end(); ++filtersIterator) |
45 | { | 45 | { |
46 | - filtersIterator->second->RequestReady(); | 46 | + filtersIterator->second->requestReady(); |
47 | } | 47 | } |
48 | #endif | 48 | #endif |
49 | } | 49 | } |
@@ -54,7 +54,7 @@ void DmpFilterResponseDecorator::flush() | @@ -54,7 +54,7 @@ void DmpFilterResponseDecorator::flush() | ||
54 | DmpServerFiltersMap::const_iterator filtersIterator; | 54 | DmpServerFiltersMap::const_iterator filtersIterator; |
55 | for (filtersIterator = filters_.begin(); filtersIterator != filters_.end(); ++filtersIterator) | 55 | for (filtersIterator = filters_.begin(); filtersIterator != filters_.end(); ++filtersIterator) |
56 | { | 56 | { |
57 | - filtersIterator->second->SendResponse(); | 57 | + filtersIterator->second->sendResponse(); |
58 | } | 58 | } |
59 | #endif | 59 | #endif |
60 | response_.flush(); | 60 | response_.flush(); |
@@ -66,7 +66,7 @@ void DmpFilterResponseDecorator::finish() | @@ -66,7 +66,7 @@ void DmpFilterResponseDecorator::finish() | ||
66 | DmpServerFiltersMap::const_iterator filtersIterator; | 66 | DmpServerFiltersMap::const_iterator filtersIterator; |
67 | for (filtersIterator = filters_.begin(); filtersIterator != filters_.end(); ++filtersIterator) | 67 | for (filtersIterator = filters_.begin(); filtersIterator != filters_.end(); ++filtersIterator) |
68 | { | 68 | { |
69 | - filtersIterator->second->ResponseComplete(); | 69 | + filtersIterator->second->responseComplete(); |
70 | } | 70 | } |
71 | #endif | 71 | #endif |
72 | response_.finish(); | 72 | response_.finish(); |
@@ -17,6 +17,7 @@ | @@ -17,6 +17,7 @@ | ||
17 | #include "dmpfilterresponsedecorator.h" | 17 | #include "dmpfilterresponsedecorator.h" |
18 | #include "dmpservercontext.h" | 18 | #include "dmpservercontext.h" |
19 | #include "dmpserverapicontext.h" | 19 | #include "dmpserverapicontext.h" |
20 | +#include "dmpserverplugins.h" | ||
20 | 21 | ||
21 | using namespace std; | 22 | using namespace std; |
22 | 23 | ||
@@ -128,7 +129,7 @@ void DmpMainServer::HandleRequest(DmpServerRequest &request, DmpServerResponse & | @@ -128,7 +129,7 @@ void DmpMainServer::HandleRequest(DmpServerRequest &request, DmpServerResponse & | ||
128 | void DmpMainServer::InitPython() | 129 | void DmpMainServer::InitPython() |
129 | { | 130 | { |
130 | // Init plugins | 131 | // Init plugins |
131 | - if (!DmpServerPlugins::InitPlugins(server_interface_)) | 132 | + if (!DmpServerPlugins::InitPlugins(serverInterface_)) |
132 | { | 133 | { |
133 | LOGGER_WARN("No server python plugins are available"); | 134 | LOGGER_WARN("No server python plugins are available"); |
134 | } | 135 | } |
1 | [MetaData] | 1 | [MetaData] |
2 | pgsqlConnect="hostaddr=localhost port=5432 dbname='dmap_dms' user='postgres' password='chinadci'" | 2 | pgsqlConnect="hostaddr=localhost port=5432 dbname='dmap_dms' user='postgres' password='chinadci'" |
3 | -metaUrl=http://ip:port | ||
4 | -email=zhongpingw@chinadci.com | ||
3 | +metaUrl=http://172.26.60.100:8841/ |
@@ -16,7 +16,8 @@ | @@ -16,7 +16,8 @@ | ||
16 | #include <boost/property_tree/xml_parser.hpp> | 16 | #include <boost/property_tree/xml_parser.hpp> |
17 | #include <sstream> | 17 | #include <sstream> |
18 | #include <fstream> | 18 | #include <fstream> |
19 | - | 19 | +#include <iostream> |
20 | +#include "dmplogger.h" | ||
20 | 21 | ||
21 | 22 | ||
22 | DmpServerManager::DmpServerManager() | 23 | DmpServerManager::DmpServerManager() |
@@ -49,8 +50,11 @@ void DmpServerManager::init(const boost::filesystem::path &modulePath) | @@ -49,8 +50,11 @@ void DmpServerManager::init(const boost::filesystem::path &modulePath) | ||
49 | { | 50 | { |
50 | serverRegistry_->init(modulePath); | 51 | serverRegistry_->init(modulePath); |
51 | 52 | ||
52 | - LoadServices(); | ||
53 | - //LoadDmpServices(); | 53 | + if(!LoadServices()) |
54 | + { | ||
55 | + std::cout << "加载服务失败!" << std::endl; | ||
56 | + LOGGER_ERROR("加载服务失败!"); | ||
57 | + } | ||
54 | } | 58 | } |
55 | 59 | ||
56 | std::string DmpServerManager::getCapabilities() | 60 | std::string DmpServerManager::getCapabilities() |
@@ -20,6 +20,7 @@ | @@ -20,6 +20,7 @@ | ||
20 | #include <map> | 20 | #include <map> |
21 | #include <string> | 21 | #include <string> |
22 | #include "dmpserver.h" | 22 | #include "dmpserver.h" |
23 | +#include "dmpconfig.h" | ||
23 | 24 | ||
24 | using namespace std; | 25 | using namespace std; |
25 | 26 | ||
@@ -159,7 +160,7 @@ std::string DmpServerRegistry::getCapabilities() | @@ -159,7 +160,7 @@ std::string DmpServerRegistry::getCapabilities() | ||
159 | boost::property_tree::ptree root; | 160 | boost::property_tree::ptree root; |
160 | boost::property_tree::ptree ptServers; | 161 | boost::property_tree::ptree ptServers; |
161 | root.put("product", "DMap Server"); | 162 | root.put("product", "DMap Server"); |
162 | - root.put("version", "4.0"); | 163 | + root.put("version", VERSION); |
163 | 164 | ||
164 | for (const auto &server : servers_) { | 165 | for (const auto &server : servers_) { |
165 | std::shared_ptr<DmpServer> pserver = server.second; | 166 | std::shared_ptr<DmpServer> pserver = server.second; |
请
注册
或
登录
后发表评论