Skip to content

Commit

Permalink
HPCC-32948 Make ws_logaccess WSDL match exception return behavior
Browse files Browse the repository at this point in the history
The service returns exceptions inline, but the WSDL does not show the
exceptions array in the method response elements.

Fix the interface defn to ensure the WSDL shows exceptions are returned
inline.

Note these caveats:

- This change cannot be versioned and will retroactively change
the WSDLs for all service interface versions. The alternative is that a
current exception response would not validate against the WSDL.
- Even with the fix the response will not match the WSDL in some cases.
Transactions sent with "Content Type: application/x-www-form-urlencoded"
(most of the requests from ECLWatch) return inline exception responses
missing the root "ESPresponse" element. The root of the response is the
"Exceptions" element.

Signed-off-by: Terrence Asselin <[email protected]>
  • Loading branch information
asselitx committed Nov 14, 2024
1 parent 55df43c commit eb3e8ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions esp/scm/ws_logaccess.ecm
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ ESPStruct [nil_remove] LogColumn
ESPenum LogColumnValueType ColumnType;
};

ESPResponse GetLogAccessInfoResponse
ESPResponse [exceptions_inline] GetLogAccessInfoResponse
{
[min_ver("1.04")] ESParray<ESPstruct LogColumn, Column> Columns;
string RemoteLogManagerType;
Expand Down Expand Up @@ -222,13 +222,14 @@ ESPRequest GetLogsRequest
[min_ver("1.03")] ESParray<ESPstruct SortCondition> SortBy;
};

ESPResponse GetLogsResponse
ESPResponse [exceptions_inline] GetLogsResponse
{
string LogLines;
[min_ver("1.02")] unsigned int LogLineCount;
[min_ver("1.02")] unsigned int TotalLogLinesAvailable;
};


ESPservice [auth_feature("WsLogAccess:READ"), version("1.06"), default_client_version("1.06"), exceptions_inline("xslt/exceptions.xslt")] ws_logaccess
{
ESPmethod GetLogAccessInfo(GetLogAccessInfoRequest, GetLogAccessInfoResponse);
Expand Down
1 change: 1 addition & 0 deletions esp/services/ws_logaccess/WsLogAccessService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ ILogAccessFilter * buildBinaryLogFilter(IConstBinaryLogFilter * binaryfilter)
}
}


bool Cws_logaccessEx::onGetLogs(IEspContext &context, IEspGetLogsRequest &req, IEspGetLogsResponse & resp)
{
if (!queryRemoteLogAccessor())
Expand Down

0 comments on commit eb3e8ff

Please sign in to comment.