Skip to content

Commit

Permalink
HPCC-31618 Internal clients use latest version of ESP services unless…
Browse files Browse the repository at this point in the history
… generated_client_version specified

This change updates internal clients so that they use latest version
of ESP services by default. The new generated_client_version attribute
has been implemented that may be used to override this behavour and to
allow a specific version to be specified for internal clients.

generated_client_version has been used to ensure that this change to
default behaviour does not affect any existing services other than
ws_fs.  FileServices plugin requires the latest version. The following
services use generated_client_version to ensure that they continue to
use the same version as before: ws_access, WsCloud, WsESDLConfig,
WsLoggingService, ws_machine, WsResources, WsTopology, WsUseMethodName
and WsUseRequestName.

Signed-off-by: Shamser Ahmed <[email protected]>
  • Loading branch information
shamser committed Apr 18, 2024
1 parent b731757 commit 960d300
Show file tree
Hide file tree
Showing 37 changed files with 31 additions and 54 deletions.
1 change: 0 additions & 1 deletion esp/scm/ldapenvironment.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ ESPresponse EchoResponse
ESPservice [
version("1.00"),
default_client_version("1.00"),
service_use_latest_version,
exceptions_inline("./smc_xslt/exceptions.xslt")
] ldapenvironment
{
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_access.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ ESPresponse [nil_remove] UserAccountExportResponse
[http_content("application/octet-stream")] binary Result;
};

ESPservice [version("1.17"), service_use_latest_version, auth_feature("NONE"), exceptions_inline("./smc_xslt/exceptions.xslt")] ws_access
ESPservice [version("1.17"), generated_client_version("0.0"), auth_feature("NONE"), exceptions_inline("./smc_xslt/exceptions.xslt")] ws_access
{
ESPmethod [client_xslt("/esp/xslt/access_users.xslt")] Users(UserRequest, UserResponse);
ESPmethod [client_xslt("/esp/xslt/access_useredit.xslt")] UserEdit(UserEditRequest, UserEditResponse);
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_account.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ESPresponse [exceptions_inline] VerifyUserResponse
};

//Kevin/russ does this method need feature level check?
ESPservice [auth_feature("NONE"), version("1.06"), default_client_version("1.06"), service_use_latest_version, exceptions_inline("./smc_xslt/exceptions.xslt")] ws_account
ESPservice [auth_feature("NONE"), version("1.06"), default_client_version("1.06"), exceptions_inline("./smc_xslt/exceptions.xslt")] ws_account
{
ESPmethod [client_xslt("/esp/xslt/account_myaccount.xslt")] MyAccount(MyAccountRequest, MyAccountResponse);
ESPmethod [client_xslt("/esp/xslt/account_input.xslt")] UpdateUserInput(UpdateUserInputRequest, UpdateUserInputResponse);
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_cloud.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ESPresponse [encode(0)] GetServicesResponse
[json_inline(1)] string Result;
};

ESPservice [auth_feature("CloudAccess:ACCESS"), version("1.01"), service_use_latest_version, exceptions_inline("./smc_xslt/exceptions.xslt")] WsCloud
ESPservice [auth_feature("CloudAccess:ACCESS"), version("1.01"), generated_client_version("0.00"), exceptions_inline("./smc_xslt/exceptions.xslt")] WsCloud
{
ESPmethod [auth_feature("CloudAccess:READ")] GetPODs(GetPODsRequest, GetPODsResponse);
ESPmethod [auth_feature("CloudAccess:READ"), min_ver("1.01")] GetServices(GetServicesRequest, GetServicesResponse);
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_codesign.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ ESPresponse [exceptions_inline] ListUserIDsResponse
ESParray<string> UserIDs;
};

ESPservice [auth_feature("CodeSignAccess:ACCESS"), version("1.1"), default_client_version("1.1"), service_use_latest_version, exceptions_inline("./smc_xslt/exceptions.xslt")] ws_codesign
ESPservice [auth_feature("CodeSignAccess:ACCESS"), version("1.1"), default_client_version("1.1"), exceptions_inline("./smc_xslt/exceptions.xslt")] ws_codesign
{
ESPmethod [auth_feature("CodeSignAccess:FULL"), client_xslt("/esp/xslt/codesign.xslt")] Sign(SignRequest, SignResponse);
ESPmethod [auth_feature("CodeSignAccess:READ")] ListUserIDs(ListUserIDsRequest, ListUserIDsResponse);
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_configmgr.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ ESPrequest WizardTestRequest



ESPservice [auth_feature("DEFERRED"),version("2.0"), default_client_version("2.0"), service_use_latest_version, exceptions_inline("xslt/exceptions.xslt"), disable_profile_execution] ws_configmgr
ESPservice [auth_feature("DEFERRED"), version("2.0"), default_client_version("2.0"), exceptions_inline("xslt/exceptions.xslt"), disable_profile_execution] ws_configmgr
{
ESPMethod
[
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_dali.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ ESPrequest [nil_remove] ClearTraceTransactionsRequest
};

ESPservice [auth_feature("NONE"), //This declares that the method logic handles feature level authorization
version("1.07"), default_client_version("1.07"), service_use_latest_version, exceptions_inline("./smc_xslt/exceptions.xslt")] WSDali
version("1.07"), default_client_version("1.07"), exceptions_inline("./smc_xslt/exceptions.xslt")] WSDali
{
ESPmethod [min_ver("1.01")] SetValue(SetValueRequest, ResultResponse);
ESPmethod [min_ver("1.01")] GetValue(GetValueRequest, ResultResponse);
Expand Down
1 change: 0 additions & 1 deletion esp/scm/ws_dfs.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ ESPservice [
auth_feature("DEFERRED"),
version("1.01"),
default_client_version("1.01"),
service_use_latest_version,
noforms,
exceptions_inline("./smc_xslt/exceptions.xslt")] WsDfs
{
Expand Down
1 change: 0 additions & 1 deletion esp/scm/ws_dfu.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,6 @@ ESPservice [
auth_feature("DEFERRED"),
version("1.65"),
default_client_version("1.65"),
service_use_latest_version,
noforms,
exceptions_inline("./smc_xslt/exceptions.xslt")] WsDfu
{
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_dfuXref.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ ESPresponse [exceptions_inline] DFUXRefUnusedFilesResponse
};

// ===========================================================================
ESPservice [version("1.04"), default_client_version("1.04"), service_use_latest_version, auth_feature("DEFERRED"), exceptions_inline("./smc_xslt/exceptions.xslt")] WsDFUXRef
ESPservice [version("1.04"), default_client_version("1.04"), auth_feature("DEFERRED"), exceptions_inline("./smc_xslt/exceptions.xslt")] WsDFUXRef
{
///ESPmethod [resp_xsl_default("./smc_xslt/xref_main.xslt")] DFUXRefList(DFUXRefListRequest, DFUXRefListResponse);
ESPmethod [resp_xsl_default("/esp/xslt/xref_main.xslt")] DFUXRefList(DFUXRefListRequest, DFUXRefListResponse);
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_elk.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ESPResponse GetConfigDetailsResponse
string LogStashPort;
};

ESPservice [auth_feature("WsELKAccess:ACCESS"), version("1.0"), default_client_version("1.0"), service_use_latest_version, exceptions_inline("xslt/exceptions.xslt"), disable_profile_execution] ws_elk
ESPservice [auth_feature("WsELKAccess:ACCESS"), version("1.0"), default_client_version("1.0"), exceptions_inline("xslt/exceptions.xslt"), disable_profile_execution] ws_elk
{
ESPmethod [auth_feature("WsELKAccess:READ")] GetConfigDetails(GetConfigDetailsRequest, GetConfigDetailsResponse);
};
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_esdlconfig.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ ESPresponse [exceptions_inline] ListESDLBindingsResponse
};

#define VERSION_FOR_ESDLCMD "1.5"
ESPservice [auth_feature("ESDLConfigAccess:ACCESS"), version("1.5"), service_use_latest_version, exceptions_inline("./smc_xslt/exceptions.xslt")] WsESDLConfig
ESPservice [auth_feature("ESDLConfigAccess:ACCESS"), version("1.5"), generated_client_version("0.0"), exceptions_inline("./smc_xslt/exceptions.xslt")] WsESDLConfig
{
ESPmethod Echo(EchoRequest, EchoResponse);
ESPmethod [auth_feature("ESDLConfigAccess:WRITE")] PublishESDLDefinition(PublishESDLDefinitionRequest, PublishESDLDefinitionResponse);
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_espcontrol.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ ESPresponse [exceptions_inline, nil_remove, http_encode(0)] AttachToDaliResponse
string Message;
};

ESPservice [auth_feature("NONE"), version("1.03"), default_client_version("1.03"), service_use_latest_version, exceptions_inline("./smc_xslt/exceptions.xslt")] WSESPControl
ESPservice [auth_feature("NONE"), version("1.03"), default_client_version("1.03"), exceptions_inline("./smc_xslt/exceptions.xslt")] WSESPControl
{
ESPmethod SetLogging(SetLoggingRequest, SetLoggingResponse);
ESPmethod [min_ver("1.03")] GetLoggingSettings(GetLoggingSettingsRequest, GetLoggingSettingsResponse);
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_fileio.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ ReadFileDataResponse
};


ESPservice [auth_feature("DEFERRED"), version("1.01"), default_client_version("1.01"), service_use_latest_version, exceptions_inline("./smc_xslt/exceptions.xslt")] WsFileIO
ESPservice [auth_feature("DEFERRED"), version("1.01"), default_client_version("1.01"), exceptions_inline("./smc_xslt/exceptions.xslt")] WsFileIO
{
ESPmethod CreateFile(CreateFileRequest, CreateFileResponse);
ESPmethod WriteFileData(WriteFileDataRequest, WriteFileDataResponse);
Expand Down
1 change: 0 additions & 1 deletion esp/scm/ws_fs.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,6 @@ ESPresponse [exceptions_inline, nil_remove] GetRemoteTargetsResponse
ESPservice [
auth_feature("DEFERRED"),
version("1.26"),
service_use_latest_version,
exceptions_inline("./smc_xslt/exceptions.xslt")] FileSpray
{
ESPmethod EchoDateTime(EchoDateTime, EchoDateTimeResponse);
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_logaccess.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ ESPResponse GetLogsResponse
[min_ver("1.02")] unsigned int TotalLogLinesAvailable;
};

ESPservice [auth_feature("WsLogAccess:READ"), version("1.05"), default_client_version("1.05"), service_use_latest_version, exceptions_inline("xslt/exceptions.xslt")] ws_logaccess
ESPservice [auth_feature("WsLogAccess:READ"), version("1.05"), default_client_version("1.05"), exceptions_inline("xslt/exceptions.xslt")] ws_logaccess
{
ESPmethod GetLogAccessInfo(GetLogAccessInfoRequest, GetLogAccessInfoResponse);
ESPmethod GetLogs(GetLogsRequest, GetLogsResponse);
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_loggingservice.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ESPresponse [exceptions_inline] UpdateLogResponse
string StatusMessage;
};

ESPService [auth_feature("DEFERRED"), version("1.0"), service_use_latest_version, noforms, use_method_name] WsLoggingService
ESPService [auth_feature("DEFERRED"), version("1.0"), generated_client_version("0.0"), noforms, use_method_name] WsLoggingService
{
ESPmethod GetTransactionSeed(GetTransactionSeedRequest, GetTransactionSeedResponse);
ESPmethod UpdateLog(UpdateLogRequest, UpdateLogResponse);
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_machine.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ ESPresponse [encode(0), nil_remove, exceptions_inline] GetNodeGroupUsageResponse
};

//-------- service ---------
ESPservice [auth_feature("DEFERRED"), version("1.18"), service_use_latest_version] ws_machine
ESPservice [auth_feature("DEFERRED"), version("1.18"), generated_client_version("0.0")] ws_machine
{
ESPmethod [resp_xsl_default("./smc_xslt/clusterprocesses.xslt"), exceptions_inline("./smc_xslt/exceptions.xslt")]
GetTargetClusterInfo(GetTargetClusterInfoRequest, GetTargetClusterInfoResponse);
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_packageprocess.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ ESPresponse [exceptions_inline] GetPartFromPackageMapResponse
string Content;
};

ESPservice [auth_feature("NONE"), version("1.06"), default_client_version("1.06"), service_use_latest_version, exceptions_inline("./smc_xslt/exceptions.xslt")] WsPackageProcess
ESPservice [auth_feature("NONE"), version("1.06"), default_client_version("1.06"), exceptions_inline("./smc_xslt/exceptions.xslt")] WsPackageProcess
{
ESPmethod Echo(EchoRequest, EchoResponse);
ESPmethod [auth_feature("PackageMapAccess:WRITE")] AddPackage(AddPackageRequest, AddPackageResponse);
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_resources.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ ESPresponse [nil_remove, exceptions_inline] TargetQueryResponse
ESParray<string> Roxies;
};

ESPservice [auth_feature("ResourceQueryAccess:ACCESS"), version("1.03"), service_use_latest_version, exceptions_inline("./smc_xslt/exceptions.xslt"), disable_profile_execution] WsResources
ESPservice [auth_feature("ResourceQueryAccess:ACCESS"), version("1.03"), generated_client_version("0.0"), exceptions_inline("./smc_xslt/exceptions.xslt"), disable_profile_execution] WsResources
{
ESPmethod [auth_feature("ResourceQueryAccess:READ"), min_ver("1.03")] TargetQuery(TargetQueryRequest, TargetQueryResponse);
ESPmethod [auth_feature("ResourceQueryAccess:READ")] ServiceQuery(ServiceQueryRequest, ServiceQueryResponse);
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_sasha.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ ESPrequest [nil_remove] ListWURequest
};

ESPservice [auth_feature("DEFERRED"), //This declares that the method logic handles feature level authorization
version("1.01"), default_client_version("1.01"), service_use_latest_version, exceptions_inline("./smc_xslt/exceptions.xslt")] WSSasha
version("1.01"), default_client_version("1.01"), exceptions_inline("./smc_xslt/exceptions.xslt")] WSSasha
{
ESPmethod [auth_feature("SashaAccess:Access")] GetVersion(GetVersionRequest, ResultResponse);
ESPmethod [auth_feature("SashaAccess:FULL")] ArchiveWU(ArchiveWURequest, ResultResponse); //archive ECL WUs or DFU WUs
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_smc.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ ESPresponse [exceptions_inline] GetBuildInfoResponse
ESParray<ESPstruct NamedValue> BuildInfo;
};

ESPservice [auth_feature("DEFERRED"), noforms, version("1.27"), default_client_version("1.27"), service_use_latest_version, exceptions_inline("./smc_xslt/exceptions.xslt"), use_method_name] WsSMC
ESPservice [auth_feature("DEFERRED"), noforms, version("1.27"), default_client_version("1.27"), exceptions_inline("./smc_xslt/exceptions.xslt"), use_method_name] WsSMC
{
ESPmethod Index(SMCIndexRequest, SMCIndexResponse);
ESPmethod [resp_xsl_default("/esp/xslt/index.xslt")] Activity(ActivityRequest, ActivityResponse);
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_sql.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ ESPresponse CreateTableAndLoadResponse
ESPstruct ECLWorkunit Workunit;
};

ESPservice [version("3.06"), default_client_version("3.06"), service_use_latest_version, auth_feature("DEFERRED"), exceptions_inline("./smc_xslt/exceptions.xslt")] wssql
ESPservice [version("3.06"), default_client_version("3.06"), auth_feature("DEFERRED"), exceptions_inline("./smc_xslt/exceptions.xslt")] wssql
{
ESPmethod [min_ver("3.03")] CreateTableAndLoad(CreateTableAndLoadRequest, CreateTableAndLoadResponse);
ESPmethod [min_ver("3.02")] SetRelatedIndexes(SetRelatedIndexesRequest, SetRelatedIndexesResponse);
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_store.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ ESPresponse [exceptions_inline] CreateStoreResponse
[min_ver("1.01")] bool Success;
};

ESPservice [version("1.02"), default_client_version("1.02"), service_use_latest_version, auth_feature("WsStoreAccess:READ"), exceptions_inline("./smc_xslt/exceptions.xslt")] wsstore
ESPservice [version("1.02"), default_client_version("1.02"), auth_feature("WsStoreAccess:READ"), exceptions_inline("./smc_xslt/exceptions.xslt")] wsstore
{
ESPmethod [auth_feature("WsStoreAccess:READ"), min_ver("1.02")] ListStores(ListStoresRequest, ListStoresResponse);
ESPmethod [auth_feature("WsStoreAccess:FULL")] Delete(DeleteRequest, DeleteResponse);
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_topology.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ ESPresponse [exceptions_inline] TpListLogFilesResponse
ESParray<ESPStruct LogFileStruct> Files;
};

ESPservice [auth_feature("DEFERRED"), noforms, version("1.32"), service_use_latest_version, cache_group("ESPWsTP"), exceptions_inline("./smc_xslt/exceptions.xslt")] WsTopology
ESPservice [auth_feature("DEFERRED"), noforms, version("1.32"), generated_client_version("0.0"), cache_group("ESPWsTP"), exceptions_inline("./smc_xslt/exceptions.xslt")] WsTopology
{
ESPmethod [cache_seconds(180), cache_global(1), resp_xsl_default("/esp/xslt/targetclusters.xslt")] TpTargetClusterQuery(TpTargetClusterQueryRequest, TpTargetClusterQueryResponse);
ESPmethod [cache_seconds(180), cache_global(1), resp_xsl_default("/esp/xslt/topology.xslt")] TpClusterQuery(TpClusterQueryRequest, TpClusterQueryResponse);
Expand Down
2 changes: 1 addition & 1 deletion esp/scm/ws_workunits.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ EspInclude(ws_workunits_queryset_req_resp);

ESPservice [
auth_feature("DEFERRED"), //This declares that the method logic handles feature level authorization
version("2.00"), default_client_version("2.00"), service_use_latest_version, cache_group("ESPWsWUs"),
version("2.00"), default_client_version("2.00"), cache_group("ESPWsWUs"),
noforms,exceptions_inline("./smc_xslt/exceptions.xslt"),use_method_name] WsWorkunits
{
ESPmethod [cache_seconds(60), resp_xsl_default("/esp/xslt/workunits.xslt")] WUQuery(WUQueryRequest, WUQueryResponse);
Expand Down
1 change: 0 additions & 1 deletion testing/esp/esdlcmd/inputs/ws_baz.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ ESPservice [
auth_feature("DEFERRED"),
version("1"),
default_client_version("1"),
service_use_latest_version,
] WsBaz
{
ESPmethod BazSearch(BazSearchRequest, BazSearchResponse);
Expand Down
1 change: 0 additions & 1 deletion testing/esp/esdlcmd/inputs/ws_doublesvc.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ ESPservice [
auth_feature("DEFERRED"),
version("1"),
default_client_version("1"),
service_use_latest_version,
] WsFoobar
{
ESPmethod FoobarSearch(FoobarSearchRequest, FoobarSearchResponse);
Expand Down
1 change: 0 additions & 1 deletion testing/esp/esdlcmd/inputs/ws_exc_test_1.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ ESPservice [
auth_feature("DEFERRED"),
version("1"),
default_client_version("1"),
service_use_latest_version,
exceptions_inline("./smc_xslt/exceptions.xslt"),
] WsExcTest1
{
Expand Down
1 change: 0 additions & 1 deletion testing/esp/esdlcmd/inputs/ws_exc_test_2.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ ESPservice [
auth_feature("DEFERRED"),
version("1"),
default_client_version("1"),
service_use_latest_version,
http_exceptions_inline("./smc_xslt/exceptions.xslt"),
] WsExcTest2
{
Expand Down
1 change: 0 additions & 1 deletion testing/esp/esdlcmd/inputs/ws_exc_test_3.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ ESPservice [
auth_feature("DEFERRED"),
version("1"),
default_client_version("1"),
service_use_latest_version,
] WsExcTest3
{
ESPmethod SoapFaultExceptions(SoapFaultExceptionsRequest, SoapFaultExceptionsResponse);
Expand Down
1 change: 0 additions & 1 deletion testing/esp/esdlcmd/inputs/ws_foobar.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ ESPservice [
auth_feature("DEFERRED"),
version("1"),
default_client_version("1"),
service_use_latest_version,
] WsFoobar
{
ESPmethod FoobarSearch(FoobarSearchRequest, FoobarSearchResponse);
Expand Down
1 change: 0 additions & 1 deletion testing/esp/esdlcmd/inputs/ws_test.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ ESPservice [
auth_feature("DEFERRED"),
version("1"),
default_client_version("1"),
service_use_latest_version,
] WsTest
{
// should be present regardless of version filtering
Expand Down
2 changes: 1 addition & 1 deletion testing/esp/esdlcmd/inputs/ws_usemethodname.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ESPresponse OrangeResponse
bool Peels;
};

ESPservice[version("1"), service_use_latest_version, use_method_name] WsUseMethodName
ESPservice[version("1"), generated_client_version("0.0"), use_method_name] WsUseMethodName
{
ESPmethod Unique(FooRequest, FooResponse);
ESPmethod Apple(FruitRequest, FruitResponse);
Expand Down
2 changes: 1 addition & 1 deletion testing/esp/esdlcmd/inputs/ws_userequestname.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ESPresponse OrangeResponse
bool Peels;
};

ESPservice[version("1"), service_use_latest_version] WsUseRequestName
ESPservice[version("1"), generated_client_version("0.0"),] WsUseRequestName
{
ESPmethod Unique(FooRequest, FooResponse);
ESPmethod Apple(FruitRequest, FruitResponse);
Expand Down
16 changes: 7 additions & 9 deletions tools/hidl/hidlcomp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4914,17 +4914,15 @@ void EspServInfo::write_esp_client_ipp()
outs("\tIMPLEMENT_IINTERFACE;\n\n");

outf("\tCClient%s()\n\t{\n", name_);
outs("\t\tsoap_reqid=0;\n\t");
outf("\t\tsoap_action.append(\"%s\");\n\t", name_);
const char *ver = getMetaString("default_client_version", NULL);
outs("\t\tsoap_reqid=0;\n");
outf("\t\tsoap_action.append(\"%s\");\n", name_);
// use latest 'version' unless 'generated_client_version' provided
const char *ver = getMetaString("generated_client_version", nullptr);
if (!ver || !*ver)
{
if (hasMetaString("service_use_latest_version"))
ver = getMetaString("version", nullptr);
}
ver = getMetaString("version", nullptr);
if (ver && *ver)
outf("\t\tsoap_action.append(\"?ver_=\").append(%s);\n\t", ver);
outf("}\n\tvirtual ~CClient%s(){}\n", name_);
outf("\t\tsoap_action.append(\"?ver_=\").append(%s);\n", ver);
outf("\t}\n\tvirtual ~CClient%s(){}\n", name_);

outs("\tvirtual void setProxyAddress(const char *address)\n\t{\n\t\tsoap_proxy.set(address);\n\t}\n");
outs("\tvirtual void addServiceUrl(const char *url)\n\t{\n\t\tsoap_url.set(url);\n\t}\n");
Expand Down
10 changes: 0 additions & 10 deletions tools/hidl/hidlcomp.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,11 +418,6 @@ inline const char* getMetaConstId(MetaTagInfo *list, const char *tag, const char
return (mti!=NULL) ? mti->getConstId() : def_val;
}

inline bool hasMetaString(MetaTagInfo *list, const char *tag)
{
return findMetaTag(list, tag)!=nullptr;
}

// return: true if the ver tag is defined
bool hasMetaVerInfo(MetaTagInfo *list, const char* tag);
bool getMetaVerInfo(MetaTagInfo *list, const char* tag, StrBuffer& s);
Expand Down Expand Up @@ -1232,11 +1227,6 @@ class EspServInfo
return ::getMetaInt(tags, tag, def_val);
}

bool hasMetaString(const char *tag) const
{
return ::hasMetaString(tags, tag);
}

void write_event_interface();
void write_esp_interface();
void write_client_interface();
Expand Down

0 comments on commit 960d300

Please sign in to comment.