Hello,
I need to create Orders and Entitlements (based on the opportunity products data) when user clicks a custom button.
I have already created an action (without any parameters. Please let me know if I need to use parameters or not for this case).

I have also created the custom button:

Custom button successfully reads the javascript code, I have tested it with an alert('hello world').
I have created a dummy plugin, just to see if it works with the button:

I've also updated the step like this:

I think that everything is OK until here.
Now, the javascript code to call the plugin which is not working...
function createordersbutton() {
debugger;
var entityId = Xrm.Page.data.entity.getId();
var entityName = "opportunityproduct";
var requestName = "zst_opportunityproductcreateordersandentitlements";
var xml = ""
"Target" entityId "" entityName "" requestName ""
"";
var xmlHttpRequest = new XMLHttpRequest();
xmlHttpRequest.open("POST", "cenacis.crm8.dynamics.com/.../web", true);
xmlHttpRequest.setRequestHeader("SOAPAction","schemas.microsoft.com/.../Execute");
xmlHttpRequest.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
xmlHttpRequest.setRequestHeader("Accept", "application/xml, text/xml, */*");
//xmlHttpRequest.setRequestHeader("Content-Length", xml.length);
xmlHttpRequest.send(xml);
var resultXml = xmlHttpRequest.responseText;
alert(resultXml);
}The alert appears but it is empty. I also get 404 not found on console (network).
Any help would be greatly appreciated.