Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 82002

Call external webservice using Javascript

$
0
0

I have write a function in Javascript who call an external WCFWebService.

We have associated the function to a button of a ribbon bar in Dynamics CRM 2011.

If I click the button the call to WebService fail with error Status 0

If I call the function from a normal HTML page all work.

Using the IE Developer Toolbar Network Capture I have see who the system change the HTTP command from POST to OPTIONS.

The call was made with the standar HTTPRequest object:

var xhr = new XMLHttpRequest();

xhr.open("POST", url, true);

xhr.setRequestHeader("Content-type", "text/xml; charset=utf-8");

xhr.setRequestHeader("SOAPAction", "<soap action>");

xhr.send(msg);

Why CRM change from POST to OPTIONS?

How I can call a webservice from Javascript inside CRM?

Thanks

Lorenzo Soncini


Viewing all articles
Browse latest Browse all 82002

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>