
Hi all,
i have two CRM's. On one server is development company. On second live version.
Calling Nav Web service working on dev but on live xmlhttp.Send returning status 0.
I am calling CRM on both servers from my local browser (IE,Firefox) throught vpn. Problem is not in browser settings.
I tried write C# solution for call WS on live to i am sure thats is not problem in Nav WS. Its ok.
Have some from you some idea where can be problem?
Thank you very much for eny idea
Vlado
Script:
function InvokeNavWS(URL, method, nameSpace, returnTag, parameters) {
var result = "";
try {
var request = '<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="' + SoapEnvelopeNS + '">' +
'<soap:Body>' +
'<' + method + ' xmlns="' + nameSpace + '">' +
parameters +
'</' + method + '>' +
'</soap:Body>' +
'</soap:Envelope>';
var xmlhttp;
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
}
else {// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.open('POST', URL, false);
xmlhttp.setRequestHeader('Content-type', 'text/xml; charset="utf-8"');
xmlhttp.setRequestHeader('Content-length', request.length);
xmlhttp.setRequestHeader('SOAPAction', '"' + method + '"');
// Setup event handler when readystate changes
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4) {
if (xmlhttp.status == 200) {
var xmldoc = new ActiveXObject('Microsoft.XMLDOM');
xmldoc.async = 'false';
xmldoc.loadXML(xmlhttp.response);
result = xmldoc.text;
}
}
}
// Send request will return when event has fired with readyState 4
xmlhttp.send(request);
}
catch (e) {
result = "";
}
return result;
}
*This post is locked for comments
I have the same question (0)We called nav web service in custom workflow in an earlier implementation, works fine.