I have been trying to call an ASP.NET web service using JavaScript code. It calls the web service - but does not pass ANY of the parameters. It seems like this should be easy. Any ideas would be much appreciated!!
I'll paste code for a simplified example using my EchoString web method:
var cURL = the URL to my WSDL file;
var oService = SOAP.connect(cURL);
var oRequest = { EchoString: {value: "test"}};
var oResults = SOAP.request({
cURL: cURL,
oRequest: oRequest,
cAction: "http://mynamespace/EchoString",
bEncoded: false,
cNameSpace: "http://mynamespace",
cResponseStyle: SOAPMessageStyle.Message
});
Based on the value a user chooses from a list, you can pass that value to the service.
Enter the following script on the event you want to trigger the web service:
In JavaScript: xfa.connectionSet.MyWSDLDataConnection.execute(0);
In FormCalc: $connectionSet.MyWSDLDataConnection.execute(0)
In both cases, the parameter being passed is a Boolean value. When the results are returned from the web service, this value indicates whether the entire data DOM should be merged with the form or whether the returned values will replace those in the current instance of the form. Zero (0) indicates that the data will not be remerged; that is, no new fields or subforms will be added or removed directly as a result of this execute operation. One (1) indicates that all data in the data DOM will be remerged.
My favorite quote - "Success is the ability to go from one failure to another with no loss of enthusiasm.