これが私のコードです:
function DoAddAllCartItems(spaceID, colorID, themeID, width) {
$.ajax({
type: 'POST',
url: 'myservice.svc/AddAllCartItems',
data: "{spaceID: " + "'" + spaceID + "'" + ", colorID: " + "'" + colorID + "'" + ", themeID: " + "'" + themeID + "'" + ", width: " + "'" + width + "'" + "}",
contentType: "application/soap+xml; charset=utf-8",
dataType: "xml",
error: function () {
alert("Error");
},
success: function (response) {
alert(response);
}
});
}
[OperationContract]
[WebInvoke(Method = "POST",
BodyStyle = WebMessageBodyStyle.Wrapped,
ResponseFormat = WebMessageFormat.Json)]
string AddAllCartItems(int spaceID, int colorID, int themeID, int width);