project BLF > class RPCRequestService > method ValidateInputDS
Description
This method validates the input dataset handle.
This method can only be called when the context properties are read.
Parameters
| izInputDS | input | dataset-handle | |
| oiReturnStatus | output | integer | Return status of the method. |
Internal usage
BLF
program code (program1/rpcrequestservice.p)
/* Search for the XSD file */
assign vcXSDFile = search("xml/":U + lc(vcComponentNameRPCRS) + ".xsd":U).
if vcXSDFile = ?
then do:
create tErrors.
assign tErrors.tcFcMessage = subst(trim(#T-3'The XSD file for the component &1 is not found.':255(5146)T-3#), lc(vcComponentNameRPCRS))
tErrors.tcFcMsgNumber = "BLF-RPCRS-5"
tErrors.tiFcSeverity = 3
tErrors.tcFcType = "E"
tErrors.tcFcContext = trim(#T-4'This message comes from program/RPCRequestService.p.':255(5142)T-4#)
tErrors.tcFcRowid = string(rowid(tErrors))
oiReturnStatus = -1.
return.
end.
assign vlSuccess = izInputDS:read-xmlschema("file", vcXSDFile, ?, ?, "LOOSE") no-error.
if not vlSuccess or
error-status:error
then do:
create tErrors.
assign tErrors.tcFcMessage = trim(#T-5'The izInputDS schema does not match the corresponding XSD file.':255(73477294)T-5#)
tErrors.tcFcMsgNumber = "BLF-RPCRS-6"
tErrors.tiFcSeverity = 3
tErrors.tcFcType = "E"
tErrors.tcFcContext = trim(#T-6'This message comes from program/RPCRequestService.p.':255(5142)T-6#)
tErrors.tcFcRowid = string(rowid(tErrors))
oiReturnStatus = -1.
return.
end.