You are using the crm Internal method that's why it is failing. Use the below script that should close opportunity as won
function closeOpportunityAsWon() {
var opportunityId=Xrm.Page.data.entity.getId();
var xml = "" +
"<s:Envelope xmlns:s=\"schemas.xmlsoap.org/.../envelope\">" +
"<s:Body>" +
"<Execute xmlns=\"schemas.microsoft.com/.../Services\" xmlns:i=\"www.w3.org/.../XMLSchema-instance\">" +
"<request i:type=\"b:WinOpportunityRequest\" xmlns:a=\"schemas.microsoft.com/.../Contracts\" xmlns:b=\"schemas.microsoft.com/.../Contracts\">" +
"<a:Parameters xmlns:c=\"schemas.datacontract.org/.../System.Collections.Generic\">" +
"<a:KeyValuePairOfstringanyType>" +
"<c:key>OpportunityClose</c:key>" +
"<c:value i:type=\"a:Entity\">" +
"<a:Attributes>" +
"<a:KeyValuePairOfstringanyType>" +
"<c:key>opportunityid</c:key>" +
"<c:value i:type=\"a:EntityReference\">" +
"<a:Id>" + opportunityId + "</a:Id>" +
"<a:LogicalName>opportunity</a:LogicalName>" +
"<a:Name i:nil=\"true\"/>" +
"</c:value>" +
"</a:KeyValuePairOfstringanyType>" +
"<a:KeyValuePairOfstringanyType>" +
"<c:key>subject</c:key>" +
"<c:value i:type=\"d:string\" xmlns:d=\"www.w3.org/.../XMLSchema\">Won the Opportunity!</c:value>" +
"</a:KeyValuePairOfstringanyType>" +
"</a:Attributes>" +
"<a:EntityState i:nil=\"true\"/>" +
"<a:FormattedValues/>" +
"<a:Id>00000000-0000-0000-0000-000000000000</a:Id>" +
"<a:LogicalName>opportunityclose</a:LogicalName>" +
"<a:RelatedEntities/>" +
"</c:value>" +
"</a:KeyValuePairOfstringanyType>" +
"<a:KeyValuePairOfstringanyType>" +
"<c:key>Status</c:key>" +
"<c:value i:type=\"a:OptionSetValue\">" +
"<a:Value>3</a:Value>" +
"</c:value>" +
"</a:KeyValuePairOfstringanyType>" +
"</a:Parameters>" +
"<a:RequestId i:nil=\"true\"/>" +
"<a:RequestName>WinOpportunity</a:RequestName>" +
"</request>" +
"</Execute>" +
"</s:Body>" +
"</s:Envelope>";
var xmlHttpRequest = new XMLHttpRequest();
xmlHttpRequest.open("POST", Xrm.Page.context.getClientUrl() + "/XRMServices/2011/Organization.svc/web", false);
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);
Xrm.Utility.openentityform(Xrm.Page.data.entity.getEntityName(),opportunityId)
}