1,066 questions
SOAP webservice in Excel Javascript API
Simon Martyn
1
Reputation point
Is it possible to connect to a SOAP webservice using the Javascript window in Excel?
Based on javascript soap examples I've found I have tried the following without luck.
I'm not familiar with javascript yet so I don't know if it's possible or I just have an error in my code.
function main(workbook: ExcelScript.Workbook) {
var objXMLHttpRequest = new XMLHttpRequest();
objXMLHttpRequest.open("GET", "http://MXL:7101/MXL/MXLService?wsdl", true);
objXMLHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
var packet = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mxl="http://mxl.com/"> < soapenv: Header/>< soapenv: Body > <mxl: Version /> </soapenv:Body></soapenv:Envelope>';
objXMLHttpRequest.send(packet);
let response = objXMLHttpRequest.responseText;
console.log(response);
}
Microsoft 365 and Office Development Office JavaScript API
Microsoft 365 and Office Development Other
4,375 questions
Sign in to answer