Dear all,
I have some legacy asmx web services that I would like to call from javascript for the custom widget I am building. The asmx web service has a number of operations that take input parameters to run. I have attempted to the web service as shown below
var requestData = esriRequest({
url: ".../webservice.asmx/OperationName",
content: {parameterName: "parameterVale"},
handleAs: "xml"
});
requestData.then(
function (data){
console.log("Data:",data);
},
function (error){
console.log("error:",error);
}
When I run I get the following error in the console
RequestError: Unable to load //mydomainname/webservicename.asmx/OperationName?parameterName=parameterValue status: 500.
I can run the webservice manually by the way and it returns the result xml as I expect to. Any ideas will be much appreciated.
Using Javascript 3.18