on 03-06-2019 4:46 PM
Dear Expert,
Can any one tell me the real example for the SAPUI5 MockServer setRequests?
requests
.
Default value is is[]
Each array entry should consist of an object with the following properties / values:
response
function. In addition to this, parameters can be written in this notation::param
. These placeholder will be replaced by regular expression groups.
My example: Does it correct? and how to correct the issue if it is not correct?
path: new RegExp("GetProdsByAlertDate(.*), :storeId='0000000528' "),
xhr.respondXML(iStatusCode, mHeaders, sXmlString)
. By default an XML header is set for response header
My example: Where should I handle the storeId parameter and how to assign a value to the parameter inside the function?
response: function(oXhr, storeId) {
jQuery.sap.require("jquery.sap.xml");
var oAnnotations = jQuery.sap.sjax({
url: sLocalUri,
dataType: "xml"
}).data;
oXhr.respondXML(200, { }, jQuery.sap.serializeXML(oAnnotations));
return true;
}
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.