Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

ActiveXObject.Open throwing access denied error, in crm webresource calling external webservice

Posted on by Microsoft Employee

var WEB_SERVICE_URL = "b1crmappuat.bca.gov.sg/CRM_CCMP_GetRoutingHistoryCCMP.asmx";
//"192.168.30.156/.../CRM_ESB_GetRoutingHistoryCCMP.asmx";

var SOAP_PARAMETER =
"<?xml version='1.0' encoding='utf-8'?>" +
"<GetRoutingHistoryCCMPRequestType>" +
" <CentralCaseID>" + CentralCaseID + "</CentralCaseID>" +
" <AgencyCaseID>" + ticketnumber + "</AgencyCaseID>" +
"</GetRoutingHistoryCCMPRequestType>";

/*Preparing XML Soap Request for calling */
var SOAP_REQUESTXML = "<soap:Envelope xmlns:soap='schemas.xmlsoap.org/.../envelope'" +
" xmlns:xsi='www.w3.org/.../XMLSchema-instance'" +
" xmlns:xsd='www.w3.org/.../XMLSchema'>" +
" <soap:Body>" +
" <GetRoutingHistoryCCMP xmlns='http://tempuri.org/'>";

SOAP_REQUESTXML = SOAP_REQUESTXML + " <reqXml>" + SOAP_PARAMETER.encodeXml() + "</reqXml>";
// Added below parameters to the XML as the webmethod requires additional parameters - ON 18 JUN 2016
SOAP_REQUESTXML = SOAP_REQUESTXML + " <caseID>" + incidentID + "</caseID>";
SOAP_REQUESTXML = SOAP_REQUESTXML + " <transactionID>" + " " + "</transactionID>";
SOAP_REQUESTXML = SOAP_REQUESTXML + " </GetRoutingHistoryCCMP>";
SOAP_REQUESTXML = SOAP_REQUESTXML + " </soap:Body>";
SOAP_REQUESTXML = SOAP_REQUESTXML + " </soap:Envelope>";

var CallingFunctionURL = "http://tempuri.org/" + "GetRoutingHistoryCCMP";

// xmlHttp = new XMLHttpRequest();
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");

xmlHttp.open("POST", "b1crmappuat.bca.gov.sg/CRM_CCMP_GetRoutingHistoryCCMP.asmx", true);
xmlHttp.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xmlHttp.setRequestHeader("Content-Length", SOAP_REQUESTXML.length);
xmlHttp.setRequestHeader("SOAPAction", CallingFunctionURL);
xmlHttp.onreadystatechange = function () {

ParseResult();
};
xmlHttp.send(SOAP_REQUESTXML);

but the ActiveXObject , Xmlhttp.Open() method throwing error saying access denied 

please help, when CRM binding is http, i didnt face this error, now CRM binding changed to https via SSL validation, when i try to access the external website it throwing error now 

thanks

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans