From f5cc2ad6a2e07e94d8559ada725dabd3750d66a2 Mon Sep 17 00:00:00 2001 From: Ken Rowland Date: Tue, 23 May 2023 15:56:30 -0400 Subject: [PATCH] HPCC-29554 Improve XSD form generation Converted form generation to use new schema generation using service XML and XSLT transforms Signed-Off-By: Kenneth Rowland kenneth.rowland@lexisnexisrisk.com --- dali/dfuplus/CMakeLists.txt | 3 +- ecl/ecl-bundle/CMakeLists.txt | 1 + ecl/ecl-package/CMakeLists.txt | 2 +- ecl/eclcmd/CMakeLists.txt | 1 + ecl/eclcmd/queries/CMakeLists.txt | 1 + ecl/eclcmd/roxie/CMakeLists.txt | 1 + ecl/eclplus/CMakeLists.txt | 62 +-- esp/bindings/http/platform/httpbinding.cpp | 441 ++++-------------- esp/bindings/http/platform/httpbinding.hpp | 8 +- esp/clients/WUManager/CMakeLists.txt | 30 +- esp/clients/ws_dfsclient/CMakeLists.txt | 1 + esp/clients/wsdfuaccess/CMakeLists.txt | 16 +- esp/clients/wsecl/CMakeLists.txt | 1 + .../cassandraloggingagent/CMakeLists.txt | 1 + .../espserverloggingagent/CMakeLists.txt | 1 + .../modularlogagent/CMakeLists.txt | 1 + esp/logging/loggingmanager/CMakeLists.txt | 1 + esp/logging/test/CMakeLists.txt | 5 +- esp/services/WsDeploy/CMakeLists.txt | 1 + esp/services/espcontrol/CMakeLists.txt | 1 + esp/services/ldapenvironment/CMakeLists.txt | 1 + esp/services/ws_access/CMakeLists.txt | 1 + esp/services/ws_account/CMakeLists.txt | 1 + esp/services/ws_codesign/CMakeLists.txt | 1 + esp/services/ws_config/CMakeLists.txt | 1 + esp/services/ws_dali/CMakeLists.txt | 1 + .../ws_decoupledlogging/CMakeLists.txt | 1 + esp/services/ws_dfsservice/CMakeLists.txt | 1 + esp/services/ws_dfu/CMakeLists.txt | 1 + esp/services/ws_ecl/CMakeLists.txt | 1 + esp/services/ws_elk/CMakeLists.txt | 1 + esp/services/ws_fileio/CMakeLists.txt | 1 + esp/services/ws_fs/CMakeLists.txt | 1 + esp/services/ws_logaccess/CMakeLists.txt | 1 + esp/services/ws_loggingservice/CMakeLists.txt | 3 +- esp/services/ws_machine/CMakeLists.txt | 1 + esp/services/ws_packageprocess/CMakeLists.txt | 1 + esp/services/ws_resources/CMakeLists.txt | 2 + esp/services/ws_smc/CMakeLists.txt | 1 + esp/services/ws_sql/CMakeLists.txt | 1 + esp/services/ws_store/CMakeLists.txt | 1 + esp/services/ws_topology/CMakeLists.txt | 1 + esp/services/ws_workunits/CMakeLists.txt | 1 + esp/smc/SMCLib/CMakeLists.txt | 63 +-- esp/tools/tankfile/CMakeLists.txt | 5 +- plugins/fileservices/CMakeLists.txt | 76 +-- 46 files changed, 260 insertions(+), 489 deletions(-) diff --git a/dali/dfuplus/CMakeLists.txt b/dali/dfuplus/CMakeLists.txt index c46cd515340..5116fb0beff 100644 --- a/dali/dfuplus/CMakeLists.txt +++ b/dali/dfuplus/CMakeLists.txt @@ -43,6 +43,7 @@ include_directories ( ./../../system/xmllib ./../../esp/platform ./../../esp/clients + ${HPCC_SOURCE_DIR}/esp/esdllib ./../../rtl/include ./../../system/include ./../../system/jlib @@ -69,5 +70,3 @@ target_link_libraries ( dfuplus xmllib esphttp ) - - diff --git a/ecl/ecl-bundle/CMakeLists.txt b/ecl/ecl-bundle/CMakeLists.txt index e3ab5bf3828..e8a0b1b87ae 100644 --- a/ecl/ecl-bundle/CMakeLists.txt +++ b/ecl/ecl-bundle/CMakeLists.txt @@ -49,6 +49,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/bindings/SOAP/xpp ${HPCC_SOURCE_DIR}/esp/platform ${HPCC_SOURCE_DIR}/esp/smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/system/security/shared ${HPCC_SOURCE_DIR}/system/include ${HPCC_SOURCE_DIR}/system/xmllib diff --git a/ecl/ecl-package/CMakeLists.txt b/ecl/ecl-package/CMakeLists.txt index 9a2bd0be2e8..8e9d5b17ed5 100644 --- a/ecl/ecl-package/CMakeLists.txt +++ b/ecl/ecl-package/CMakeLists.txt @@ -48,6 +48,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/bindings/SOAP/xpp ${HPCC_SOURCE_DIR}/esp/platform ${HPCC_SOURCE_DIR}/esp/smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/system/security/shared ${HPCC_SOURCE_DIR}/system/include ${HPCC_SOURCE_DIR}/system/xmllib @@ -73,4 +74,3 @@ if ( UNIX ) install ( PROGRAMS ecl-package.install DESTINATION etc/init.d/install COMPONENT Runtime ) install ( PROGRAMS ecl-package.uninstall DESTINATION etc/init.d/uninstall COMPONENT Runtime ) endif ( UNIX ) - diff --git a/ecl/eclcmd/CMakeLists.txt b/ecl/eclcmd/CMakeLists.txt index 9e3085ca4b2..930b1c6cbb7 100644 --- a/ecl/eclcmd/CMakeLists.txt +++ b/ecl/eclcmd/CMakeLists.txt @@ -65,6 +65,7 @@ include_directories ( ./../../esp/bindings/http/client ./../../system/include ./../../esp/bindings + ${HPCC_SOURCE_DIR}/esp/esdllib ./../../ecl/hql ./../../ecl/eclcc ./../../dali/base diff --git a/ecl/eclcmd/queries/CMakeLists.txt b/ecl/eclcmd/queries/CMakeLists.txt index 187c2bbc578..74ec37807f7 100644 --- a/ecl/eclcmd/queries/CMakeLists.txt +++ b/ecl/eclcmd/queries/CMakeLists.txt @@ -41,6 +41,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/bindings/SOAP/xpp ${HPCC_SOURCE_DIR}/esp/platform ${HPCC_SOURCE_DIR}/esp/smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/system/security/shared ${HPCC_SOURCE_DIR}/system/include ${HPCC_SOURCE_DIR}/system/xmllib diff --git a/ecl/eclcmd/roxie/CMakeLists.txt b/ecl/eclcmd/roxie/CMakeLists.txt index e44fcc326a2..cc67eefcc1a 100644 --- a/ecl/eclcmd/roxie/CMakeLists.txt +++ b/ecl/eclcmd/roxie/CMakeLists.txt @@ -39,6 +39,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/bindings/SOAP/xpp ${HPCC_SOURCE_DIR}/esp/platform ${HPCC_SOURCE_DIR}/esp/smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/system/security/shared ${HPCC_SOURCE_DIR}/system/include ${HPCC_SOURCE_DIR}/system/xmllib diff --git a/ecl/eclplus/CMakeLists.txt b/ecl/eclplus/CMakeLists.txt index c6c30272356..85ba074b5ca 100644 --- a/ecl/eclplus/CMakeLists.txt +++ b/ecl/eclplus/CMakeLists.txt @@ -15,53 +15,54 @@ ################################################################################ -# Component: eclplus +# Component: eclplus ##################################################### # Description: # ------------ # Cmake Input File for eclplus ##################################################### -project( eclplus ) +project( eclplus ) include(${HPCC_SOURCE_DIR}/esp/scm/smcscm.cmake) include(${HPCC_SOURCE_DIR}/esp/scm/espscm.cmake) -set ( SRCS - ../../esp/bindings/bindutil.cpp +set ( SRCS + ../../esp/bindings/bindutil.cpp ${ESPSCM_GENERATED_DIR}/common_esp.cpp ${ESPSCM_GENERATED_DIR}/ws_workunits_struct_esp.cpp ${ESPSCM_GENERATED_DIR}/ws_workunits_req_resp_esp.cpp ${ESPSCM_GENERATED_DIR}/ws_workunits_queryset_req_resp_esp.cpp - ${ESPSCM_GENERATED_DIR}/ws_workunits_esp.cpp + ${ESPSCM_GENERATED_DIR}/ws_workunits_esp.cpp ${ESPSCM_GENERATED_DIR}/ws_logaccess_esp.cpp - DeleteHelper.cpp - DumpHelper.cpp - eclplus.cpp - formattypes.cpp - ListHelper.cpp - main.cpp - QueryHelper.cpp - ViewHelper.cpp + DeleteHelper.cpp + DumpHelper.cpp + eclplus.cpp + formattypes.cpp + ListHelper.cpp + main.cpp + QueryHelper.cpp + ViewHelper.cpp ) -include_directories ( +include_directories ( ./../../system/security/shared - ./../../system/mp - ./../../common/dllserver - ./../../common/fileview2 - ./../../common/workunit - ./../../esp/clients - ./../../common/environment - ./../../esp/bindings/SOAP/xpp - ./../../system/include - ./../../esp/bindings - ./../../ecl/hql - ./../../dali/base - ./../../esp/platform - ./../../system/jlib - ./../../system/xmllib + ./../../system/mp + ./../../common/dllserver + ./../../common/fileview2 + ./../../common/workunit + ./../../esp/clients + ./../../common/environment + ./../../esp/bindings/SOAP/xpp + ./../../system/include + ./../../esp/bindings + ${HPCC_SOURCE_DIR}/esp/esdllib + ./../../ecl/hql + ./../../dali/base + ./../../esp/platform + ./../../system/jlib + ./../../system/xmllib ${HPCC_SOURCE_DIR}/common/thorhelper ) @@ -70,8 +71,7 @@ ADD_DEFINITIONS( -DECLPLUS_EXPORTS -D_CONSOLE -DWSWU_API_LOCAL -Dws_logaccess_AP HPCC_ADD_EXECUTABLE ( eclplus ${SRCS} ) add_dependencies ( eclplus espscm ) install ( TARGETS eclplus RUNTIME DESTINATION ${EXEC_DIR} ) -target_link_libraries ( eclplus +target_link_libraries ( eclplus jlib - esphttp + esphttp ) - diff --git a/esp/bindings/http/platform/httpbinding.cpp b/esp/bindings/http/platform/httpbinding.cpp index 14de4699692..adcff0a827c 100644 --- a/esp/bindings/http/platform/httpbinding.cpp +++ b/esp/bindings/http/platform/httpbinding.cpp @@ -47,7 +47,6 @@ #include "workunit.hpp" #include "cumulativetimer.hpp" #include -#include "esdl_def_helper.hpp" #define FILE_UPLOAD "FileUploadAccess" #define DEFAULT_HTTP_PORT 80 @@ -116,7 +115,7 @@ static void setBndCfgServiceType(IPropertyTree* tree, const char* procName, IPro } -static void generateEsdlNamespace(IEspContext &context, CHttpRequest* request, const char *serv, const char *method, StringBuffer &ns, double version) { +static void generateEsdlNamespace(IEspContext &context, CHttpRequest* request, const char *serv, const char *method, StringBuffer &ns) { ns.append("urn:hpccsystems:ws:"); if (serv && *serv) ns.appendLower(strlen(serv), serv); @@ -1259,8 +1258,6 @@ int EspHttpBinding::onGetStaticIndex(IEspContext &context, CHttpRequest* request -#if 1 - //============================================================ // Filter out XML by schema using Schema parser without indent @@ -1419,21 +1416,25 @@ void EspHttpBinding::getXMLMessageTag(IEspContext& ctx, bool isRequest, const ch } // new way to generate soap message -void EspHttpBinding::getSoapMessage(StringBuffer& soapmsg, IEspContext& ctx, CHttpRequest* request, const char *serv, const char *method) +void EspHttpBinding::getSoapMessage(StringBuffer& soapmsg, IEspContext& ctx, CHttpRequest* request, const char *serviceQName, const char *methodQName) { - StringBuffer reqName(serv); + StringBuffer reqName(serviceQName); reqName.append("Request"); Owned msg = new CRpcMessage(reqName.str()); msg->setContext(&ctx); - Owned rpcreq = createReqBinding(ctx, request, serv, method); + Owned rpcreq = createReqBinding(ctx, request, serviceQName, methodQName); rpcreq->serialize(*msg); StringBuffer req, tag, schema, filtered; msg->marshall(req, NULL); - getSchema(schema,ctx,request,serv,method,false); - getXMLMessageTag(ctx, true, method, tag); + Owned params; + params.set(createProperties()); + + getServiceSchema(ctx, request, serviceQName, methodQName, params, getVersion(ctx), EsdlXslToXsd, schema); + + getXMLMessageTag(ctx, true, methodQName, tag); filterXmlBySchema(req,schema,tag.str(),filtered); StringBuffer ns; @@ -1443,15 +1444,15 @@ void EspHttpBinding::getSoapMessage(StringBuffer& soapmsg, IEspContext& ctx, CHt " xmlns:SOAP-ENC=\"http://schemas.xmlsoap.org/soap/encoding/\"" " xmlns=\"%s\">" " %s ", - generateNamespace(ctx, request, serv, method, ns).str(), filtered.str() + generateNamespace(ctx, request, serviceQName, methodQName, ns).str(), filtered.str() ); } -void EspHttpBinding::getJsonMessage(StringBuffer& jsonmsg, IEspContext& ctx, CHttpRequest* request, const char *serv, const char *method) +void EspHttpBinding::getJsonMessage(StringBuffer& jsonmsg, IEspContext& ctx, CHttpRequest* request, const char *serviceQName, const char *methodQName) { ESPSerializationFormat orig_format = ctx.getResponseFormat(); ctx.setResponseFormat(ESPSerializationJSON); - Owned rpcreq = createReqBinding(ctx, request, serv, method); + Owned rpcreq = createReqBinding(ctx, request, serviceQName, methodQName); CSoapRequestBinding* reqbind = dynamic_cast(rpcreq.get()); if (reqbind) { @@ -1461,124 +1462,6 @@ void EspHttpBinding::getJsonMessage(StringBuffer& jsonmsg, IEspContext& ctx, CHt ctx.setResponseFormat(orig_format); } -#else - -//========================================================= -// Filter out XML by schema using Schema parser with indent - -static void filterXmlBySchema(IPTree* in, IXmlType* type, const char* tag, StringBuffer& out,int indent) -{ - assertex(type); - - if (type->isComplexType()) - { - out.pad(indent).appendf("<%s>\n", tag); - int flds = type->getFieldCount(); - for (int i=0; iqueryFieldName(i); - IPTree* fld = in ? in->queryBranch(fldName) : NULL; - filterXmlBySchema(fld,type->queryFieldType(i),fldName,out,indent+1); - } - out.pad(indent).appendf("\n",tag); - } - else if (type->isArray()) - { - out.pad(indent).appendf("<%s>\n", tag); - //check xml first to decide items, if 0, check schema, generate 1 item by default - const char* itemName = type->queryFieldName(0); - IXmlType* itemType = type->queryFieldType(0); - if (!itemName || !itemType) - { - VStringBuffer s("*** Invalid array definition: tag=%s, indent=%d, itemName=%s", tag, indent,itemName?itemName:"NULL"); - out.append(s); - IERRLOG(s); - return; - } - - bool hasChild = false; - if (in) - { - Owned it = in->getElements(itemName); - for (it->first(); it->isValid(); it->next()) - { - hasChild = true; - filterXmlBySchema(&it->query(), itemType, itemName, out,indent+1); - } - } - - if (!hasChild) - { - filterXmlBySchema(NULL, itemType, itemName, out,indent+1); - } - out.pad(indent).appendf("\n",tag); - } - else // simple type - { - out.pad(indent).appendf("<%s>", tag); - if (in) - { - const char* value = in->queryProp(NULL); - if (value) - encodeUtf8XML(value,out); - } - out.appendf("\n", tag); - } -} - -static void filterXmlBySchema(StringBuffer& in, StringBuffer& schema, StringBuffer& out,int indent) -{ - Owned sp = createXmlSchema(schema); - Owned tree = createPTreeFromXMLString(in); - - //VStringBuffer name("tns:%s", tree->queryName()); - const char* name = tree->queryName(); - IXmlType* type = sp->queryElementType(name); - if (!type) - { - StringBuffer method(strlen(name)-7, name); - type = sp->queryElementType(method); - } - - if (type) - filterXmlBySchema(tree,type,name,out,indent); - else - { - const char* value = tree->queryProp(NULL); - DBGLOG("Unknown xml tag ignored: <%s>%s", name, value?value:"", name); - } -} - -void EspHttpBinding::getSoapMessage(StringBuffer& soapmsg, IEspContext& ctx, CHttpRequest* request, const char *serv, const char *method) -{ - StringBuffer reqName(serv); - reqName.append("Request"); - Owned msg = new CRpcMessage(reqName.str()); - - Owned rpcreq = createReqBinding(ctx, request, serv, method); - rpcreq->serialize(*msg); - - // use schema to filter out fields that are internal, not belong to the version etc - StringBuffer req,schema,filtered; - msg->marshall(req, NULL); - getSchema(schema,ctx,request,serv,method,false); - //DBGLOG("Schema: %s", schema.str()); - filterXmlBySchema(req,schema,filtered,2); - - soapmsg.appendf( - "\n" - "\n \n%s \n", filtered.str()); -} - -#endif - - - int EspHttpBinding::onGetSoapBuilder(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *serv, const char *method) { StringBuffer soapmsg, serviceQName, methodQName; @@ -1843,13 +1726,25 @@ int EspHttpBinding::onGetVersion(IEspContext &context, CHttpRequest* request, CH return 0; } -void getServiceSchema(const char *serviceQName, const char *methodQName, double version, const char *nstr, - const StringBuffer &xmlFilename, Owned ¶ms, EsdlXslTypeId EsdlXslType, - IProperties *opts, StringBuffer &schema) +bool EspHttpBinding::getSchema(StringBuffer& schema, IEspContext &ctx, CHttpRequest* req, const char *service, const char *method,bool standalone) +{ + throw MakeStringException(-1, "getSchema deprecated in EspHttpBinding, use getServiceSchema instead"); +} + +void EspHttpBinding::getServiceSchema(IEspContext& context, CHttpRequest* request, const char *serviceQName, const char *methodQName, + Owned ¶ms, double version, EsdlXslTypeId EsdlXslType, StringBuffer &schema) { + IProperties *opts = context.queryRequestParameters(); + Owned esdlDef = createEsdlDefinition(nullptr, nullptr); Owned defHelper = createEsdlDefinitionHelper(); + StringBuffer xmlFilename; + if (!getXmlFilename(xmlFilename)) + { + throw MakeStringException(-1, "Unable to get service XML filename"); + } + std::string xmlFilePath(getCFD()); xmlFilePath.append("esdl_files").append(PATHSEPSTR).append(xmlFilename.str()); esdlDef->addDefinitionsFromFile(xmlFilePath.c_str()); @@ -1859,6 +1754,12 @@ void getServiceSchema(const char *serviceQName, const char *methodQName, double StringBuffer xlstFile(getCFD()); xlstFile.append("xslt").append(PATHSEPSTR).append("esp_service_xml2xsd.xslt"); + params->setProp("version", StringBuffer("'").appendf("%g", version).append("'")); + + StringBuffer nstr; + generateEsdlNamespace(context, request, serviceQName, methodQName, nstr); + params->setProp("tnsParam", StringBuffer("'").append(nstr).append("'").str()); + defHelper->loadTransform(xlstFile, params, EsdlXslType); defHelper->toWSDL(*structs, schema, EsdlXslType, version, opts, nstr, optFlags); } @@ -1886,11 +1787,6 @@ int EspHttpBinding::getServiceWsdlOrXsd(IEspContext &context, CHttpRequest* requ params.set(createProperties()); double version = getVersion(context); - params->setProp("version", StringBuffer("'").appendf("%g", version).append("'")); - - StringBuffer nstr; - generateEsdlNamespace(context, request, serviceQName.str(), methodQName.str(), nstr, version); - params->setProp("tnsParam", StringBuffer("'").append(nstr).append("'").str()); if (isWsdl) { @@ -1903,15 +1799,9 @@ int EspHttpBinding::getServiceWsdlOrXsd(IEspContext &context, CHttpRequest* requ params->setProp("location", StringBuffer("'").append(location).append("'").str()); } - StringBuffer xmlFilename; - if (!getXmlFilename(xmlFilename)) - { - throw MakeStringException(-1, "Unable to get service XML filename"); - } - StringBuffer schema; - getServiceSchema(serviceQName.str(), methodQName.str(), version, nstr.str(), xmlFilename, - params, isWsdl ? EsdlXslToWsdl : EsdlXslToXsd, context.queryRequestParameters(), schema); + getServiceSchema(context, request, serviceQName, methodQName, + params, version, isWsdl ? EsdlXslToWsdl : EsdlXslToXsd, schema); response->setContent(schema.length(), schema.str()); response->setContentType(HTTP_TYPE_APPLICATION_XML_UTF8); @@ -1921,91 +1811,6 @@ int EspHttpBinding::getServiceWsdlOrXsd(IEspContext &context, CHttpRequest* requ } -bool EspHttpBinding::getSchema(StringBuffer& schema, IEspContext &ctx, CHttpRequest* req, const char *service, const char *method, bool standalone) -{ - StringBuffer serviceQName; - StringBuffer methodQName; - - if (!qualifyServiceName(ctx, service, method, serviceQName, &methodQName)) - return false; - - const char *sqName = serviceQName.str(); - const char *mqName = methodQName.str(); - - Owned namespaces = createPTree(); - appendSchemaNamespaces(namespaces, ctx, req, service, method); - Owned nsiter = namespaces->getElements("namespace"); - - StringBuffer nstr; - generateNamespace(ctx, req, sqName, mqName, nstr); - schema.appendf("query(); - schema.appendf(" xmlns:%s=\"%s\"", ns.queryProp("@nsvar"), ns.queryProp("@ns")); - } - schema.append(">\n"); - ForEach(*nsiter) - { - IPropertyTree &ns = nsiter->query(); - if (ns.hasProp("@import")) - schema.appendf("", ns.queryProp("@ns"), ns.queryProp("@location")); - } - - - schema.append( - "" - "" - "" - "" - "" - "" - "" - "\n" - "" - "" - "" - "" - "" - "\n" - "\n" - ); - - if (ctx.queryOptions()&ESPCTX_WSDL_EXT) - { - schema.append( - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "\n" - ); - } - - bool mda = (req->queryParameters()->getPropInt("mda") != 0); - getXsdDefinition(ctx, req, schema, sqName, mqName, mda); - schema.append("\n"); - schema.append(""); - return true; -} - static void genSampleXml(StringStack& parent, IXmlType* type, StringBuffer& out, const char* tag, const char* ns=NULL) { assertex(type!=NULL); @@ -2082,7 +1887,21 @@ void EspHttpBinding::generateSampleXml(bool isRequest, IEspContext &context, CHt { StringBuffer schemaXml, element; getXMLMessageTag(context, isRequest, method, element); - getSchema(schemaXml,context,request,serv,method,false); + + StringBuffer serviceQName; + StringBuffer methodQName; + + if (!qualifyServiceName(context, serv, method, serviceQName, &methodQName)) + { + content.appendf("generateSampleXml schema error: %s::%s", serv, method); + return; + } + + Owned params; + params.set(createProperties()); + + getServiceSchema(context, request, serviceQName, methodQName, params, getVersion(context), EsdlXslToXsd, schemaXml); + Owned schema; IXmlType* type = nullptr; try @@ -2124,7 +1943,7 @@ void EspHttpBinding::generateSampleXml(bool isRequest, IEspContext &context, CHt StringBuffer content; if (method && *method) - generateSampleXml(isRequest, context, request, content, serviceName, methodName); + generateSampleXml(isRequest, context, request, content, serv, method); else { MethodInfoArray methods; @@ -2132,7 +1951,7 @@ void EspHttpBinding::generateSampleXml(bool isRequest, IEspContext &context, CHt content.appendf("<%s>\n", isRequest ? "Requests" : "Responses"); ForEachItemIn(i, methods) - generateSampleXml(isRequest, context, request, content, serviceName.str(), methods.item(i).m_label.str()); + generateSampleXml(isRequest, context, request, content, serv, methods.item(i).m_label.str()); content.appendf("\n", isRequest ? "Requests" : "Responses"); } @@ -2147,7 +1966,20 @@ void EspHttpBinding::generateSampleJson(bool isRequest, IEspContext &context, CH { StringBuffer schemaXml, element; getXMLMessageTag(context, isRequest, method, element); - getSchema(schemaXml,context,request,serv,method,false); + + StringBuffer serviceQName; + StringBuffer methodQName; + + if (!qualifyServiceName(context, serv, method, serviceQName, &methodQName)) + { + content.appendf("generateSampleXml schema error: %s::%s", serv, method); + return; + } + + Owned params; + params.set(createProperties()); + + getServiceSchema(context, request, serviceQName, methodQName, params, getVersion(context), EsdlXslToXsd, schemaXml); Owned schema; IXmlType* type = nullptr; @@ -2619,13 +2451,16 @@ int EspHttpBinding::onGetXForm(IEspContext &context, CHttpRequest* request, CHtt } else { - StringBuffer page; - IXslProcessor* xslp = getXmlLibXslProcessor(); + Owned params; + params.set(createProperties()); + double ver = getVersion(context); - // get schema + params->setProp( "all_annot_Param", "true()" ); StringBuffer schema; - context.addOptions(ESPCTX_ALL_ANNOTATION); - getSchema(schema, context, request, serv, method, true); + getServiceSchema(context, request, serviceQName, methodQName, params, ver, EsdlXslToXsd, schema); + + StringBuffer page; + IXslProcessor* xslp = getXmlLibXslProcessor(); Owned xform = xslp->createXslTransform(); xform->loadXslFromFile(StringBuffer(getCFD()).append("./xslt/gen_form.xsl").str()); @@ -2642,7 +2477,7 @@ int EspHttpBinding::onGetXForm(IEspContext &context, CHttpRequest* request, CHtt // params xform->setStringParameter("serviceName", serviceQName); StringBuffer version; - version.appendf("%g",context.getClientVersion()); + version.appendf("%g", ver); xform->setStringParameter("serviceVersion", version); StringBuffer methodExt(methodQName); @@ -2651,10 +2486,10 @@ int EspHttpBinding::onGetXForm(IEspContext &context, CHttpRequest* request, CHtt xform->setStringParameter("methodName", methodExt); // pass params to form (excluding form and __querystring) - StringBuffer params; - if (!getUrlParams(context.queryRequestParameters(),params)) - params.appendf("%cver_=%g",(params.length()>0) ? '&' : '?', context.getClientVersion()); - xform->setStringParameter("queryParams", params.str()); + StringBuffer xFormParams; + if (!getUrlParams(context.queryRequestParameters(),xFormParams)) + xFormParams.appendf("%cver_=%g",(xFormParams.length()>0) ? '&' : '?', context.getClientVersion()); + xform->setStringParameter("queryParams", xFormParams.str()); StringBuffer tmp,escaped; getMethodHelp(context, serviceQName, methodQName, tmp); @@ -2707,115 +2542,7 @@ int EspHttpBinding::onGetXForm(IEspContext &context, CHttpRequest* request, CHtt int EspHttpBinding::onGetForm(IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *serv, const char *method) { - StringBuffer serviceQName; - StringBuffer methodQName; - - if (!qualifyServiceName(context, serv, method, serviceQName, &methodQName)) - { - return onGetNotFound(context, request, response, serv); - } - else - { - StringBuffer page; - - page.append( - "" - "" - "" - "ESP Service form" - "" - "" - "" - "" - //"" - // "" - // "" - // "" - // "" - // "" - // "" - //"
" - // "" - // "
" - // "

" - // "" - // "Enterprise Services PlatformTM" - // "" - // "

" - //"
" - //"
" - "

" - "" - "" - "" - "" - "" - "" - "" - "" - "" - "
" - "

" - ""); - page.appendf("%s [Version %g]", serviceQName.str(), context.getClientVersion()); - page.append("" - "

" - "
" - "

"); - - page.appendf("> %s", methodQName.str()); - page.append("

" - "
" - "" - "" - "" - "" - "" - "
" - "


"); - getMethodDescription(context, serviceQName.str(), methodQName.str(), page); - page.append("

" - "
" - "" - "" - "" - "" - "" - "" - "" - "" - "
" - "


"); - getMethodHelp(context, serviceQName.str(), methodQName.str(), page); - page.append("

" - "
" - "" - "" - "" - "" - "" - "" - "" - "" - "
"); - getMethodHtmlForm(context, request, serviceQName.str(), methodQName.str(), page, true); - page.append("
" - "" - "" - "" - "
" - "" - ""); - - response->setContent(page.str()); - response->setContentType("text/html"); - } - - response->send(); - - return 0; + return onGetXForm(context, request, response, serv, method); } @@ -3034,7 +2761,10 @@ void EspHttpBinding::validateResponse(IEspContext& context, CHttpRequest* reques } // schema - getSchema(xsd,context,request,serviceQName,methodQName,true); + Owned params; + params.set(createProperties()); + + getServiceSchema(context, request, serviceQName, methodQName, params, getVersion(context), EsdlXslToXsd, xsd); // validation if (getEspLogLevel()>LogMax) @@ -3069,7 +2799,6 @@ void EspHttpBinding::validateResponse(IEspContext& context, CHttpRequest* reques unsigned len = temp.length(); // This has to be done before temp.detach is called! content.setBuffer(len, temp.detach(), true); } - void EspHttpBinding::sortResponse(IEspContext& context, CHttpRequest* request, MemoryBuffer& content, const char *serviceName, const char* methodName) { diff --git a/esp/bindings/http/platform/httpbinding.hpp b/esp/bindings/http/platform/httpbinding.hpp index e36ba07097f..f3e92c6f5a7 100644 --- a/esp/bindings/http/platform/httpbinding.hpp +++ b/esp/bindings/http/platform/httpbinding.hpp @@ -24,6 +24,8 @@ #include "bindutil.hpp" #include "seclib.hpp" +#include "esdl_def_helper.hpp" + class CMethodInfo : public CInterface { @@ -451,14 +453,16 @@ class esp_http_decl EspHttpBinding : void generateSampleJson(bool isRequest, IEspContext &context, CHttpRequest* request, StringBuffer &content, const char *serv, const char *method); void generateSampleJson(bool isRequest, IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *serv, const char *method); void generateSampleXmlFromSchema(bool isRequest, IEspContext &context, CHttpRequest* request, CHttpResponse* response, const char *serv, const char *method, const char * schemaxml); - virtual void getSoapMessage(StringBuffer& soapmsg, IEspContext &context, CHttpRequest* request, const char *serv, const char *method); - virtual void getJsonMessage(StringBuffer& jsonmsg, IEspContext &context, CHttpRequest* request, const char *serv, const char *method); + virtual void getSoapMessage(StringBuffer& soapmsg, IEspContext &context, CHttpRequest* request, const char *serviceQName, const char *methodQName); + virtual void getJsonMessage(StringBuffer& jsonmsg, IEspContext &context, CHttpRequest* request, const char *serviceQName, const char *methodQName); void onBeforeSendResponse(IEspContext& context, CHttpRequest* request,MemoryBuffer& contentconst, const char *serviceName, const char* methodName); void validateResponse(IEspContext& context, CHttpRequest* request,MemoryBuffer& contentconst, const char *serviceName, const char* methodName); void sortResponse(IEspContext& context, CHttpRequest* request,MemoryBuffer& contentconst, const char *serviceName, const char* methodName); + void getServiceSchema(IEspContext& context, CHttpRequest* request, const char *serviceQName, const char *methodQName, + Owned ¶ms, double version, EsdlXslTypeId EsdlXslType, StringBuffer &schema); }; inline bool isEclIdeRequest(CHttpRequest *request) diff --git a/esp/clients/WUManager/CMakeLists.txt b/esp/clients/WUManager/CMakeLists.txt index 5e48a2b15e7..71c5b87934d 100644 --- a/esp/clients/WUManager/CMakeLists.txt +++ b/esp/clients/WUManager/CMakeLists.txt @@ -15,38 +15,39 @@ ################################################################################ -# Component: wumanager +# Component: wumanager ##################################################### # Description: # ------------ # Cmake Input File for wumanager ##################################################### -project( wumanager ) +project( wumanager ) include(${HPCC_SOURCE_DIR}/esp/scm/smcscm.cmake) include(${HPCC_SOURCE_DIR}/esp/scm/espscm.cmake) -set ( SRCS +set ( SRCS ${ESPSCM_GENERATED_DIR}/common_esp.cpp ${ESPSCM_GENERATED_DIR}/ws_workunits_struct_esp.cpp ${ESPSCM_GENERATED_DIR}/ws_workunits_req_resp_esp.cpp ${ESPSCM_GENERATED_DIR}/ws_workunits_queryset_req_resp_esp.cpp ${ESPSCM_GENERATED_DIR}/ws_workunits_esp.cpp ${ESPSCM_GENERATED_DIR}/ws_logaccess_esp.cpp - WUManager.cpp + WUManager.cpp ) -include_directories ( +include_directories ( ./../../../system/security/shared - ./../../../system/include - ./../../bindings - ./../../bindings/SOAP/xpp - ./../../../system/xmllib - ./../../../system/jlib - ./../../platform - ./../../clients + ./../../../system/include + ./../../bindings + ./../../bindings/SOAP/xpp + ${HPCC_SOURCE_DIR}/esp/esdllib + ./../../../system/xmllib + ./../../../system/jlib + ./../../platform + ./../../clients ${HPCC_SOURCE_DIR}/common/thorhelper ) @@ -56,10 +57,10 @@ HPCC_ADD_EXECUTABLE ( wumanager ${SRCS} ) add_dependencies ( wumanager espscm ) #install ( TARGETS wumanager RUNTIME DESTINATION ${EXEC_DIR} ) # do not install - this is an example program -target_link_libraries ( wumanager +target_link_libraries ( wumanager ${XALAN_LIBRARIES} ${XERCES_LIBRARIES} jlib - xmllib + xmllib esphttp ) @@ -68,4 +69,3 @@ IF (USE_OPENSSL) securesocket ) ENDIF() - diff --git a/esp/clients/ws_dfsclient/CMakeLists.txt b/esp/clients/ws_dfsclient/CMakeLists.txt index b8f4eae786d..0bbf0cc6b64 100644 --- a/esp/clients/ws_dfsclient/CMakeLists.txt +++ b/esp/clients/ws_dfsclient/CMakeLists.txt @@ -48,6 +48,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/clients ${HPCC_SOURCE_DIR}/esp/bindings/SOAP/Platform ${HPCC_SOURCE_DIR}/esp/smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/common/environment ${HPCC_SOURCE_DIR}/dali/base ${HPCC_SOURCE_DIR}/common/thorhelper diff --git a/esp/clients/wsdfuaccess/CMakeLists.txt b/esp/clients/wsdfuaccess/CMakeLists.txt index 844e8ac6897..a8547991f2e 100644 --- a/esp/clients/wsdfuaccess/CMakeLists.txt +++ b/esp/clients/wsdfuaccess/CMakeLists.txt @@ -24,18 +24,18 @@ ##################################################### -project( wsdfuaccess ) +project( wsdfuaccess ) include(${HPCC_SOURCE_DIR}/esp/scm/smcscm.cmake) -set ( SRCS - wsdfuaccess.cpp +set ( SRCS + wsdfuaccess.cpp ${ESPSCM_GENERATED_DIR}/ws_dfu_common_esp.cpp ${ESPSCM_GENERATED_DIR}/ws_dfu_esp.cpp ) -include_directories ( - ${HPCC_SOURCE_DIR}/system/include +include_directories ( + ${HPCC_SOURCE_DIR}/system/include ${HPCC_SOURCE_DIR}/system/xmllib ${HPCC_SOURCE_DIR}/system/security/shared ${HPCC_SOURCE_DIR}/system/security/securesocket @@ -57,6 +57,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/clients ${HPCC_SOURCE_DIR}/esp/bindings/SOAP/Platform ${HPCC_SOURCE_DIR}/esp/smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/testing/unittests ) @@ -64,9 +65,9 @@ ADD_DEFINITIONS( -D_USRDLL -DWSDFUACCESS_EXPORTS -DWSDFU_API_LOCAL ) HPCC_ADD_LIBRARY( wsdfuaccess SHARED ${SRCS} ) install ( TARGETS wsdfuaccess RUNTIME DESTINATION ${EXEC_DIR} LIBRARY DESTINATION ${LIB_DIR} ) -target_link_libraries ( wsdfuaccess +target_link_libraries ( wsdfuaccess jlib - xmllib + xmllib esphttp dafsclient dafsserver @@ -79,4 +80,3 @@ target_link_libraries ( wsdfuaccess if (NOT CONTAINERIZED) target_link_libraries ( wsdfuaccess environment ) endif() - diff --git a/esp/clients/wsecl/CMakeLists.txt b/esp/clients/wsecl/CMakeLists.txt index d8f4c7ee7e7..15fbbd0adc9 100644 --- a/esp/clients/wsecl/CMakeLists.txt +++ b/esp/clients/wsecl/CMakeLists.txt @@ -44,6 +44,7 @@ include_directories ( ./../../platform ./../../bindings/SOAP/Platform ./../../bindings/SOAP/ws_ecl_client + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/common/thorhelper ./ ) diff --git a/esp/logging/loggingagent/cassandraloggingagent/CMakeLists.txt b/esp/logging/loggingagent/cassandraloggingagent/CMakeLists.txt index 27d5b84afb6..889c7d6a02b 100644 --- a/esp/logging/loggingagent/cassandraloggingagent/CMakeLists.txt +++ b/esp/logging/loggingagent/cassandraloggingagent/CMakeLists.txt @@ -37,6 +37,7 @@ if(USE_CASSANDRA) ${HPCC_SOURCE_DIR}/esp/bindings ${HPCC_SOURCE_DIR}/esp/bindings/SOAP/xpp ${HPCC_SOURCE_DIR}/esp/logging/logginglib + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/common/thorhelper ) diff --git a/esp/logging/loggingagent/espserverloggingagent/CMakeLists.txt b/esp/logging/loggingagent/espserverloggingagent/CMakeLists.txt index 5ede448348e..0e7c43e0226 100644 --- a/esp/logging/loggingagent/espserverloggingagent/CMakeLists.txt +++ b/esp/logging/loggingagent/espserverloggingagent/CMakeLists.txt @@ -44,6 +44,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/clients/espcommonclient ${HPCC_SOURCE_DIR}/esp/esdl ${HPCC_SOURCE_DIR}/esp/esplib + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/esp/logging/logginglib ${HPCC_SOURCE_DIR}/common/thorhelper ./../.. diff --git a/esp/logging/loggingagent/modularlogagent/CMakeLists.txt b/esp/logging/loggingagent/modularlogagent/CMakeLists.txt index 14df3ee64b6..6badf7caa94 100644 --- a/esp/logging/loggingagent/modularlogagent/CMakeLists.txt +++ b/esp/logging/loggingagent/modularlogagent/CMakeLists.txt @@ -45,6 +45,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/esdl ${HPCC_SOURCE_DIR}/esp/esplib ${HPCC_SOURCE_DIR}/esp/logging/logginglib + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/common/thorhelper ./../.. ./.. diff --git a/esp/logging/loggingmanager/CMakeLists.txt b/esp/logging/loggingmanager/CMakeLists.txt index da4c6208bc0..6c5ae698432 100644 --- a/esp/logging/loggingmanager/CMakeLists.txt +++ b/esp/logging/loggingmanager/CMakeLists.txt @@ -48,6 +48,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/bindings/SOAP/xpp # ./../../protocols/sidex ${HPCC_SOURCE_DIR}/esp/logging/logginglib + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/common/thorhelper ./.. ) diff --git a/esp/logging/test/CMakeLists.txt b/esp/logging/test/CMakeLists.txt index 79eebaae960..00c97d08cb1 100644 --- a/esp/logging/test/CMakeLists.txt +++ b/esp/logging/test/CMakeLists.txt @@ -50,6 +50,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/clients/LoggingClient ${HPCC_SOURCE_DIR}/esp/logging/logginglib ${HPCC_SOURCE_DIR}/esp/logging/loggingmanager + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/common/thorhelper ) @@ -61,9 +62,9 @@ target_link_libraries ( logging_test jlib loggingmanager ) - + IF (USE_OPENSSL) - target_link_libraries ( logging_test + target_link_libraries ( logging_test securesocket ) ENDIF() diff --git a/esp/services/WsDeploy/CMakeLists.txt b/esp/services/WsDeploy/CMakeLists.txt index 7b1dbbfb11b..440f8bcb8dc 100644 --- a/esp/services/WsDeploy/CMakeLists.txt +++ b/esp/services/WsDeploy/CMakeLists.txt @@ -53,6 +53,7 @@ include_directories ( ./../../bindings ./../../bindings/SOAP/xpp ./../../bindings/http/client + ${HPCC_SOURCE_DIR}/esp/esdllib ./../../../system/mp ../../../deployment/deploy ../../../deployment/deployutils diff --git a/esp/services/espcontrol/CMakeLists.txt b/esp/services/espcontrol/CMakeLists.txt index 83594abd5dd..d822c9d46e9 100644 --- a/esp/services/espcontrol/CMakeLists.txt +++ b/esp/services/espcontrol/CMakeLists.txt @@ -47,6 +47,7 @@ include_directories ( ./../../bindings ./../../bindings/SOAP/xpp ./../../smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ./../../../common/environment ${HPCC_SOURCE_DIR}/common/thorhelper ) diff --git a/esp/services/ldapenvironment/CMakeLists.txt b/esp/services/ldapenvironment/CMakeLists.txt index bae2382b685..8a58eeedc1a 100644 --- a/esp/services/ldapenvironment/CMakeLists.txt +++ b/esp/services/ldapenvironment/CMakeLists.txt @@ -34,6 +34,7 @@ include_directories( ${HPCC_SOURCE_DIR}/esp/bindings ${HPCC_SOURCE_DIR}/esp/bindings/SOAP/xpp ${HPCC_SOURCE_DIR}/esp/smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/esp/platform ${HPCC_SOURCE_DIR}/system/xmllib ${HPCC_SOURCE_DIR}/system/include diff --git a/esp/services/ws_access/CMakeLists.txt b/esp/services/ws_access/CMakeLists.txt index 0024175be69..098045c7041 100644 --- a/esp/services/ws_access/CMakeLists.txt +++ b/esp/services/ws_access/CMakeLists.txt @@ -46,6 +46,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/bindings ${HPCC_SOURCE_DIR}/esp/bindings/SOAP/xpp ${HPCC_SOURCE_DIR}/esp/smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/dali/base ${HPCC_SOURCE_DIR}/system/mp ${HPCC_SOURCE_DIR}/common/thorhelper diff --git a/esp/services/ws_account/CMakeLists.txt b/esp/services/ws_account/CMakeLists.txt index 546b893a316..6b88be3fa54 100644 --- a/esp/services/ws_account/CMakeLists.txt +++ b/esp/services/ws_account/CMakeLists.txt @@ -45,6 +45,7 @@ include_directories ( ./../../../system/security/shared ./../../bindings ./../../bindings/SOAP/xpp + ${HPCC_SOURCE_DIR}/esp/esdllib ./../../smc/SMCLib ${HPCC_SOURCE_DIR}/common/thorhelper ) diff --git a/esp/services/ws_codesign/CMakeLists.txt b/esp/services/ws_codesign/CMakeLists.txt index df5f9a98a61..88b807fea1b 100644 --- a/esp/services/ws_codesign/CMakeLists.txt +++ b/esp/services/ws_codesign/CMakeLists.txt @@ -52,6 +52,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/bindings/SOAP/xpp ${HPCC_SOURCE_DIR}/esp/bindings/http/client ${HPCC_SOURCE_DIR}/esp/http/platform + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/system/mp ${HPCC_SOURCE_DIR}/system/xmllib ${CMAKE_BINARY_DIR} diff --git a/esp/services/ws_config/CMakeLists.txt b/esp/services/ws_config/CMakeLists.txt index b258bf7ed9e..11124481575 100644 --- a/esp/services/ws_config/CMakeLists.txt +++ b/esp/services/ws_config/CMakeLists.txt @@ -52,6 +52,7 @@ include_directories ( ./../../../dali/base ./../../bindings ./../../bindings/SOAP/xpp + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/common/thorhelper ) diff --git a/esp/services/ws_dali/CMakeLists.txt b/esp/services/ws_dali/CMakeLists.txt index 2b50a464a92..0995512c39e 100644 --- a/esp/services/ws_dali/CMakeLists.txt +++ b/esp/services/ws_dali/CMakeLists.txt @@ -37,6 +37,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/bindings/SOAP/xpp ${HPCC_SOURCE_DIR}/esp/clients ${HPCC_SOURCE_DIR}/esp/smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/system/include ${HPCC_SOURCE_DIR}/system/jlib ${HPCC_SOURCE_DIR}/system/xmllib diff --git a/esp/services/ws_decoupledlogging/CMakeLists.txt b/esp/services/ws_decoupledlogging/CMakeLists.txt index ced5f4c77ac..39b281df7a7 100644 --- a/esp/services/ws_decoupledlogging/CMakeLists.txt +++ b/esp/services/ws_decoupledlogging/CMakeLists.txt @@ -48,6 +48,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/bindings/SOAP/xpp ${HPCC_SOURCE_DIR}/esp/logging/logginglib ${HPCC_SOURCE_DIR}/esp/smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/common/thorhelper ) diff --git a/esp/services/ws_dfsservice/CMakeLists.txt b/esp/services/ws_dfsservice/CMakeLists.txt index a874a361cd8..10d081c81b9 100644 --- a/esp/services/ws_dfsservice/CMakeLists.txt +++ b/esp/services/ws_dfsservice/CMakeLists.txt @@ -51,6 +51,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/clients ${HPCC_SOURCE_DIR}/esp/clients/ws_dfsclient ${HPCC_SOURCE_DIR}/esp/services/common + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/dali/base ${HPCC_SOURCE_DIR}/dali/dfu ${HPCC_SOURCE_DIR}/dali/sasha diff --git a/esp/services/ws_dfu/CMakeLists.txt b/esp/services/ws_dfu/CMakeLists.txt index 28bc5ca6dac..83c8e881d41 100644 --- a/esp/services/ws_dfu/CMakeLists.txt +++ b/esp/services/ws_dfu/CMakeLists.txt @@ -76,6 +76,7 @@ include_directories ( ./../ws_workunits ./../../bindings ./../../smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ./../../../common/fileview2 ./../../bindings/SOAP/xpp ${HPCC_SOURCE_DIR}/esp/clients diff --git a/esp/services/ws_ecl/CMakeLists.txt b/esp/services/ws_ecl/CMakeLists.txt index 3cbe3f4780a..6852f2d2574 100644 --- a/esp/services/ws_ecl/CMakeLists.txt +++ b/esp/services/ws_ecl/CMakeLists.txt @@ -38,6 +38,7 @@ include_directories ( ./../../bindings ./../../bindings/SOAP/xpp ./../../bindings/http/client + ${HPCC_SOURCE_DIR}/esp/esdllib ./../../clients ./../../../system/mp ./../../../system/jlib diff --git a/esp/services/ws_elk/CMakeLists.txt b/esp/services/ws_elk/CMakeLists.txt index fb43a75ed5a..c13593386e5 100644 --- a/esp/services/ws_elk/CMakeLists.txt +++ b/esp/services/ws_elk/CMakeLists.txt @@ -51,6 +51,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/bindings/SOAP/xpp ${HPCC_SOURCE_DIR}/esp/bindings/http/client ${HPCC_SOURCE_DIR}/esp/http/platform + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/system/mp ${HPCC_SOURCE_DIR}/system/xmllib ${CMAKE_BINARY_DIR} diff --git a/esp/services/ws_fileio/CMakeLists.txt b/esp/services/ws_fileio/CMakeLists.txt index 317e980893c..3a3573e3ade 100644 --- a/esp/services/ws_fileio/CMakeLists.txt +++ b/esp/services/ws_fileio/CMakeLists.txt @@ -56,6 +56,7 @@ include_directories ( ./../../../common/dllserver ./../../bindings ./../../smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ./../../bindings/SOAP/xpp ${HPCC_SOURCE_DIR}/common/thorhelper ${HPCC_SOURCE_DIR}/dali/sasha diff --git a/esp/services/ws_fs/CMakeLists.txt b/esp/services/ws_fs/CMakeLists.txt index 042530c8797..cbe10be2180 100644 --- a/esp/services/ws_fs/CMakeLists.txt +++ b/esp/services/ws_fs/CMakeLists.txt @@ -56,6 +56,7 @@ include_directories ( ./../../../dali/base ./../../bindings ./../../smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ./../../bindings/SOAP/xpp ./../../../fs/dafsclient ./../../../common/pkgfiles diff --git a/esp/services/ws_logaccess/CMakeLists.txt b/esp/services/ws_logaccess/CMakeLists.txt index 1470af25e19..11ee2156b5f 100644 --- a/esp/services/ws_logaccess/CMakeLists.txt +++ b/esp/services/ws_logaccess/CMakeLists.txt @@ -52,6 +52,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/bindings/SOAP/xpp ${HPCC_SOURCE_DIR}/esp/bindings/http/client ${HPCC_SOURCE_DIR}/esp/http/platform + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/system/mp ${HPCC_SOURCE_DIR}/system/xmllib ${CMAKE_BINARY_DIR} diff --git a/esp/services/ws_loggingservice/CMakeLists.txt b/esp/services/ws_loggingservice/CMakeLists.txt index b3f8346051a..a2e3adf58b3 100644 --- a/esp/services/ws_loggingservice/CMakeLists.txt +++ b/esp/services/ws_loggingservice/CMakeLists.txt @@ -37,8 +37,9 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/esplib ${HPCC_SOURCE_DIR}/esp/clients ${HPCC_SOURCE_DIR}/esp/clients/LoggingClient - ${HPCC_SOURCE_DIR}/esp/espcommon + ${HPCC_SOURCE_DIR}/esp/espcommon ${HPCC_SOURCE_DIR}/esp/logging/logginglib + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/common/thorhelper ./.. ) diff --git a/esp/services/ws_machine/CMakeLists.txt b/esp/services/ws_machine/CMakeLists.txt index e9fcc8bf46d..d06371b24f2 100644 --- a/esp/services/ws_machine/CMakeLists.txt +++ b/esp/services/ws_machine/CMakeLists.txt @@ -56,6 +56,7 @@ include_directories ( ./../../bindings/SOAP/xpp ./../../../esp/platform ./../../smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/common/thorhelper ) diff --git a/esp/services/ws_packageprocess/CMakeLists.txt b/esp/services/ws_packageprocess/CMakeLists.txt index 059d2d0fa0d..e96e236c1f7 100644 --- a/esp/services/ws_packageprocess/CMakeLists.txt +++ b/esp/services/ws_packageprocess/CMakeLists.txt @@ -48,6 +48,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/common/workunit ${HPCC_SOURCE_DIR}/rtl/include ${HPCC_SOURCE_DIR}/esp/smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ) ADD_DEFINITIONS( -D_USRDLL -DWsPackageProcess_API_LOCAL -DFileSpray_API_LOCAL -DWSDFU_API_LOCAL -DESP_SERVICE_WsPackageProcess) diff --git a/esp/services/ws_resources/CMakeLists.txt b/esp/services/ws_resources/CMakeLists.txt index 564542adcee..108a35876a3 100644 --- a/esp/services/ws_resources/CMakeLists.txt +++ b/esp/services/ws_resources/CMakeLists.txt @@ -41,6 +41,8 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/bindings/SOAP/xpp ${HPCC_SOURCE_DIR}/esp/clients ${HPCC_SOURCE_DIR}/esp/smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/system/include ${HPCC_SOURCE_DIR}/system/jlib ${HPCC_SOURCE_DIR}/system/xmllib diff --git a/esp/services/ws_smc/CMakeLists.txt b/esp/services/ws_smc/CMakeLists.txt index 4614135ffd4..7307377d080 100644 --- a/esp/services/ws_smc/CMakeLists.txt +++ b/esp/services/ws_smc/CMakeLists.txt @@ -57,6 +57,7 @@ include_directories ( ./../ws_workunits ./../../bindings ./../../smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ./../../bindings/SOAP/xpp ./../../../system/security/LdapSecurity ${CMAKE_BINARY_DIR} diff --git a/esp/services/ws_sql/CMakeLists.txt b/esp/services/ws_sql/CMakeLists.txt index 4fbe42b5b8e..88c7de049b7 100644 --- a/esp/services/ws_sql/CMakeLists.txt +++ b/esp/services/ws_sql/CMakeLists.txt @@ -103,6 +103,7 @@ if(WSSQL_SERVICE) ${HPCC_SOURCE_DIR}/rtl/eclrtl ${HPCC_SOURCE_DIR}/rtl/include ${HPCC_SOURCE_DIR}/esp/espcommon + ${HPCC_SOURCE_DIR}/esp/esdllib ) if (CMAKE_COMPILER_IS_CLANG) diff --git a/esp/services/ws_store/CMakeLists.txt b/esp/services/ws_store/CMakeLists.txt index 1ee4b99c486..dfabf86e59d 100644 --- a/esp/services/ws_store/CMakeLists.txt +++ b/esp/services/ws_store/CMakeLists.txt @@ -47,6 +47,7 @@ HPCC_ADD_SUBDIRECTORY (espstorelib) ${HPCC_SOURCE_DIR}/esp/smc/SMCLib ${HPCC_SOURCE_DIR}/esp/platform ${HPCC_SOURCE_DIR}/esp/services + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/system/xmllib ${HPCC_SOURCE_DIR}/system/include ${HPCC_SOURCE_DIR}/system/jlib diff --git a/esp/services/ws_topology/CMakeLists.txt b/esp/services/ws_topology/CMakeLists.txt index 8b504a07a04..ed71323b640 100644 --- a/esp/services/ws_topology/CMakeLists.txt +++ b/esp/services/ws_topology/CMakeLists.txt @@ -54,6 +54,7 @@ include_directories ( ./../ws_workunits ./../../bindings ./../../smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ./../../bindings/SOAP/xpp ./../..//esplib ${HPCC_SOURCE_DIR}/common/thorhelper diff --git a/esp/services/ws_workunits/CMakeLists.txt b/esp/services/ws_workunits/CMakeLists.txt index 72ebd39a8fa..0f470e81d42 100644 --- a/esp/services/ws_workunits/CMakeLists.txt +++ b/esp/services/ws_workunits/CMakeLists.txt @@ -94,6 +94,7 @@ include_directories ( ./../../bindings ./../../bindings/http/client ./../../smc/SMCLib + ${HPCC_SOURCE_DIR}/esp/esdllib ./../../bindings/SOAP/xpp ${HPCC_SOURCE_DIR}/esp/bindings/http/platform ${HPCC_SOURCE_DIR}/dali/dfu diff --git a/esp/smc/SMCLib/CMakeLists.txt b/esp/smc/SMCLib/CMakeLists.txt index 44128a991fb..e5c9db99574 100644 --- a/esp/smc/SMCLib/CMakeLists.txt +++ b/esp/smc/SMCLib/CMakeLists.txt @@ -15,14 +15,14 @@ ################################################################################ -# Component: SMCLib +# Component: SMCLib ##################################################### # Description: # ------------ # Cmake Input File for SMCLib ##################################################### -project( SMCLib ) +project( SMCLib ) include(${HPCC_SOURCE_DIR}/esp/scm/smcscm.cmake) @@ -31,7 +31,7 @@ set ( SRCS ${HPCC_SOURCE_DIR}/dali/sasha/sacmd.cpp ${ESPSCM_GENERATED_DIR}/ws_topology_esp.cpp ${ESPSCM_GENERATED_DIR}/ws_resources_esp.cpp - LogicFileWrapper.cpp + LogicFileWrapper.cpp TpCommon.cpp WUXMLInfo.cpp InfoCacheReader.cpp @@ -44,28 +44,29 @@ else () endif() -include_directories ( - ./../../../system/mp - ./../../platform - ./../../../system/jlib - ./../../bindings/SOAP/client - ./../../../common/environment - ./../../services - ./../../../dali/ft - ./../../bindings/SOAP/Platform - ./../../../system/xmllib - ./../../../system/security/securesocket +include_directories ( + ./../../../system/mp + ./../../platform + ./../../../system/jlib + ./../../bindings/SOAP/client + ./../../../common/environment + ./../../services + ./../../../dali/ft + ./../../bindings/SOAP/Platform + ./../../../system/xmllib + ./../../../system/security/securesocket ./../../../system/security/shared - ./../../../system/include - ./../../../common/workunit - ./../../../common/remote - ./../../clients + ./../../../system/include + ./../../../common/workunit + ./../../../common/remote + ./../../clients ./../../../dali/base ./../../../dali/sasha - ./../../clients/LoggingClient - ./../../bindings - ./../../bindings/SOAP/xpp - ./.. + ./../../clients/LoggingClient + ./../../bindings + ./../../bindings/SOAP/xpp + ${HPCC_SOURCE_DIR}/esp/esdllib + ./.. ${HPCC_SOURCE_DIR}/common/thorhelper ) @@ -76,15 +77,15 @@ add_dependencies(SMCLib espscm) install ( TARGETS SMCLib RUNTIME DESTINATION ${EXEC_DIR} LIBRARY DESTINATION ${LIB_DIR} ) target_link_libraries ( SMCLib jlib - remote - xmllib - esphttp - dalibase - dllserver - nbcd - eclrtl - deftype - workunit + remote + xmllib + esphttp + dalibase + dllserver + nbcd + eclrtl + deftype + workunit ) if (NOT CONTAINERIZED) diff --git a/esp/tools/tankfile/CMakeLists.txt b/esp/tools/tankfile/CMakeLists.txt index b0d614dbf5a..e56f2bfbfc8 100644 --- a/esp/tools/tankfile/CMakeLists.txt +++ b/esp/tools/tankfile/CMakeLists.txt @@ -14,7 +14,7 @@ # limitations under the License. ################################################################################ -# Component: tankfile +# Component: tankfile ##################################################### # Description: @@ -31,7 +31,7 @@ set ( SRCS archive.cpp main.cpp ${ESPSCM_GENERATED_DIR}/common_esp.cpp - ${ESPSCM_GENERATED_DIR}/ws_decoupledlogging_esp.cpp + ${ESPSCM_GENERATED_DIR}/ws_decoupledlogging_esp.cpp ) include_directories ( @@ -46,6 +46,7 @@ include_directories ( ${HPCC_SOURCE_DIR}/esp/bindings ${HPCC_SOURCE_DIR}/esp/bindings/SOAP/xpp ${HPCC_SOURCE_DIR}/esp/clients + ${HPCC_SOURCE_DIR}/esp/esdllib ${HPCC_SOURCE_DIR}/common/thorhelper ) diff --git a/plugins/fileservices/CMakeLists.txt b/plugins/fileservices/CMakeLists.txt index 48e459fdb6e..c5d953c08a5 100644 --- a/plugins/fileservices/CMakeLists.txt +++ b/plugins/fileservices/CMakeLists.txt @@ -15,70 +15,70 @@ ################################################################################ -# Component: fileservices +# Component: fileservices ##################################################### # Description: # ------------ # Cmake Input File for fileservices ##################################################### -project( fileservices ) +project( fileservices ) include(${HPCC_SOURCE_DIR}/esp/scm/smcscm.cmake) -set ( SRCS +set ( SRCS ${ESPSCM_GENERATED_DIR}/ws_dfu_common_esp.cpp - ${ESPSCM_GENERATED_DIR}/ws_dfu_esp.cpp - ${ESPSCM_GENERATED_DIR}/ws_fs_esp.cpp - fileservices.cpp - ../../esp/bindings/bindutil.cpp - ../../dali/dfuplus/dfuplus.cpp + ${ESPSCM_GENERATED_DIR}/ws_dfu_esp.cpp + ${ESPSCM_GENERATED_DIR}/ws_fs_esp.cpp + fileservices.cpp + ../../esp/bindings/bindutil.cpp + ../../dali/dfuplus/dfuplus.cpp ) -include_directories ( +include_directories ( . ./../../common/environment - ./../../common/remote - ./../../system/jhtree - ./../../system/mp - ./../../common/workunit - ./../../esp/clients - ./../../dali/ft - ./../../system/security/shared - ./../../esp/bindings/SOAP/xpp - ./../../common/deftype - ./../../system/include - ./../../esp/bindings - ./../../dali/base - ./../../ecl/eclagent - ./../../rtl/include - ./../../system/xmllib - ./../../esp/platform - ./../../system/jlib - ./../../common/thorhelper - ./../../rtl/eclrtl - ./../../dali/dfu + ./../../common/remote + ./../../system/jhtree + ./../../system/mp + ./../../common/workunit + ./../../esp/clients + ./../../dali/ft + ./../../system/security/shared + ./../../esp/bindings/SOAP/xpp + ./../../common/deftype + ./../../system/include + ./../../esp/bindings + ./../../dali/base + ./../../ecl/eclagent + ./../../rtl/include + ./../../system/xmllib + ./../../esp/platform + ${HPCC_SOURCE_DIR}/esp/esdllib + ./../../system/jlib + ./../../common/thorhelper + ./../../rtl/eclrtl + ./../../dali/dfu ./../../dali/dfuplus ./../../system/jlib ) ADD_DEFINITIONS( -D_USRDLL -DFILESERVICES_EXPORTS -DWSDFU_API_LOCAL -DFileSpray_API_LOCAL ) -HPCC_ADD_LIBRARY( fileservices SHARED ${SRCS} ) +HPCC_ADD_LIBRARY( fileservices SHARED ${SRCS} ) add_dependencies ( fileservices espscm ) install ( TARGETS fileservices DESTINATION plugins ) target_link_libraries ( fileservices jlib - remote - dalibase + remote + dalibase esphttp - dllserver - nbcd - eclrtl - deftype - workunit + dllserver + nbcd + eclrtl + deftype + workunit ) if (NOT CONTAINERIZED) target_link_libraries ( fileservices environment ) endif() -