-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HPCC-30809 Add ESP WsSasha service and implement 4 methods
Part 1: add ws_sasha framework Signed-off-by: wangkx <[email protected]>
- Loading branch information
wangkx
committed
Dec 4, 2023
1 parent
b330baf
commit efcd747
Showing
10 changed files
with
235 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,5 +17,6 @@ application: | |
- ws_codesign | ||
- ws_resources | ||
- WSDali | ||
- WSSasha | ||
- ws_logaccess | ||
- WsCloud |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
################################################################################ | ||
# HPCC SYSTEMS software Copyright (C) 2023 HPCC Systems. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
################################################################################ | ||
|
||
# Component: ws_sasha | ||
##################################################### | ||
# Description: | ||
# ------------ | ||
# Cmake Input File for ws_sasha | ||
##################################################### | ||
|
||
project( ws_sasha ) | ||
|
||
include(${HPCC_SOURCE_DIR}/esp/scm/espscm.cmake) | ||
|
||
set ( SRCS | ||
${ESPSCM_GENERATED_DIR}/ws_sasha_esp.cpp | ||
ws_sashaplugin.cpp | ||
ws_sashaservice.cpp | ||
) | ||
|
||
include_directories ( | ||
${HPCC_SOURCE_DIR}/esp/platform | ||
${HPCC_SOURCE_DIR}/esp/bindings | ||
${HPCC_SOURCE_DIR}/esp/bindings/SOAP/xpp | ||
${HPCC_SOURCE_DIR}/esp/clients | ||
${HPCC_SOURCE_DIR}/esp/smc/SMCLib | ||
${HPCC_SOURCE_DIR}/system/include | ||
${HPCC_SOURCE_DIR}/system/jlib | ||
${HPCC_SOURCE_DIR}/system/xmllib | ||
${HPCC_SOURCE_DIR}/system/security/securesocket | ||
${HPCC_SOURCE_DIR}/system/security/LdapSecurity | ||
${HPCC_SOURCE_DIR}/system/security/shared | ||
${HPCC_SOURCE_DIR}/system/mp | ||
${HPCC_SOURCE_DIR}/common/thorhelper | ||
${HPCC_SOURCE_DIR}/dali/base | ||
${HPCC_SOURCE_DIR}/dali/sasha | ||
) | ||
|
||
ADD_DEFINITIONS( -D_USRDLL -DWSSasha_API_LOCAL -DESP_SERVICE_WSSasha) | ||
|
||
HPCC_ADD_LIBRARY( ws_sasha SHARED ${SRCS} ) | ||
install ( TARGETS ws_sasha RUNTIME DESTINATION ${EXEC_DIR} LIBRARY DESTINATION ${LIB_DIR} ) | ||
target_link_libraries ( ws_sasha | ||
jlib | ||
xmllib | ||
esphttp | ||
${COMMON_ESP_SERVICE_LIBS} | ||
) | ||
|
||
IF (USE_OPENSSL) | ||
target_link_libraries ( ws_sasha | ||
securesocket | ||
) | ||
ENDIF() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/*############################################################################## | ||
HPCC SYSTEMS software Copyright (C) 2023 HPCC Systems. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
############################################################################## */ | ||
|
||
#pragma warning (disable : 4786) | ||
|
||
//ESP Bindings | ||
#include "http/platform/httpprot.hpp" | ||
|
||
//ESP Service | ||
#include "ws_sashaservice.hpp" | ||
|
||
#include "espplugin.hpp" | ||
|
||
extern "C" | ||
{ | ||
|
||
//when we aren't loading dynamically | ||
// Change the function names when we stick with dynamic loading. | ||
ESP_FACTORY IEspService* esp_service_factory(const char* name, const char* type, IPropertyTree* cfg, const char* process) | ||
{ | ||
if (strieq(type, "WSSasha")) | ||
{ | ||
CWSSashaEx* service = new CWSSashaEx; | ||
service->init(cfg, process, name); | ||
return service; | ||
} | ||
return nullptr; | ||
} | ||
|
||
ESP_FACTORY IEspRpcBinding* esp_binding_factory(const char* name, const char* type, IPropertyTree* cfg, const char* process) | ||
{ | ||
//binding names of the form <servicetype>_http are being added so the names can be made more consistent and can therefore be automatically generated | ||
// the name also better reflects that these bindings are for all HTTP based protocols, not just SOAP | ||
// both "SoapBinding" and "_http" names instantiate the same objects. | ||
if (strieq(type, "ws_sashaSoapBinding") || strieq(type, "WSSasha_http")) | ||
{ | ||
return new CWSSashaSoapBinding(cfg, name, process); | ||
} | ||
|
||
return nullptr; | ||
} | ||
|
||
ESP_FACTORY IEspProtocol* esp_protocol_factory(const char* name, const char* type, IPropertyTree* cfg, const char* process) | ||
{ | ||
return http_protocol_factory(name, type, cfg, process); | ||
} | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/*############################################################################## | ||
HPCC SYSTEMS software Copyright (C) 2023 HPCC Systems. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
############################################################################## */ | ||
|
||
#ifdef _USE_OPENLDAP | ||
#include "ldapsecurity.ipp" | ||
#endif | ||
|
||
#include "ws_sashaservice.hpp" | ||
#include "jlib.hpp" | ||
|
||
using namespace ws_sasha; | ||
|
||
void CWSSashaEx::init(IPropertyTree* cfg, const char* process, const char* service) | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/*############################################################################## | ||
HPCC SYSTEMS software Copyright (C) 2023 HPCC Systems. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
############################################################################## */ | ||
|
||
#ifndef _ESPWIZ_ws_sasha_HPP__ | ||
#define _ESPWIZ_ws_sasha_HPP__ | ||
|
||
#include "ws_sasha_esp.ipp" | ||
#include "exception_util.hpp" | ||
|
||
class CWSSashaEx : public CWSSasha | ||
{ | ||
public: | ||
IMPLEMENT_IINTERFACE; | ||
|
||
virtual void init(IPropertyTree* cfg, const char* process, const char* service) override; | ||
}; | ||
|
||
#endif //_ESPWIZ_ws_sasha_HPP__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters