Hi, I am doing this
isc.DataSource.create({
ID:"SomeDS",
dataFormat:"xml",
dataProtocol: "postParams",
dataURL:"/doc/security/docAuthorizedActions.action",
recordXPath:"//content",
fields:{
docName:{title:"Document", type:"text", name:"name"},
docIndex:{title:"Index", type:"text", name:"index"},
lastModified:{title:"Last Modified", type:"text", name:"lastmodified"}
},
showPrompt:false,
fetchData: function( criteria, callback, requestProperties ) {
progressIndicator.show();
progressIndicator.bringToFront();
var ret = this.Super("fetchData", arguments);
progressIndicator.hide();
},
transformRequest: function(dsRequest) {
var secureURL = "http://www.some.com/doc/security/";
var xmlStr1 = "<docSecurity:docAuthorizedActionsRequest xmlns:documentSecurity=secureURL><wId><%= request.getParameter("wId") %></wId></docSecurity:docAuthorizedActionsRequest>";
var params = { xml : xmlStr1 };
return isc.addProperties({}, dsRequest.data, params);
}
});
This works when I use it as a GET Request ie., Specify the xml param in the dataURL. but when using transformRequest and declaring dataProtocol: "postParams", I get an error saying expecting xml param not received...
Thankyou
isc.DataSource.create({
ID:"SomeDS",
dataFormat:"xml",
dataProtocol: "postParams",
dataURL:"/doc/security/docAuthorizedActions.action",
recordXPath:"//content",
fields:{
docName:{title:"Document", type:"text", name:"name"},
docIndex:{title:"Index", type:"text", name:"index"},
lastModified:{title:"Last Modified", type:"text", name:"lastmodified"}
},
showPrompt:false,
fetchData: function( criteria, callback, requestProperties ) {
progressIndicator.show();
progressIndicator.bringToFront();
var ret = this.Super("fetchData", arguments);
progressIndicator.hide();
},
transformRequest: function(dsRequest) {
var secureURL = "http://www.some.com/doc/security/";
var xmlStr1 = "<docSecurity:docAuthorizedActionsRequest xmlns:documentSecurity=secureURL><wId><%= request.getParameter("wId") %></wId></docSecurity:docAuthorizedActionsRequest>";
var params = { xml : xmlStr1 };
return isc.addProperties({}, dsRequest.data, params);
}
});
This works when I use it as a GET Request ie., Specify the xml param in the dataURL. but when using transformRequest and declaring dataProtocol: "postParams", I get an error saying expecting xml param not received...
Thankyou
Comment