私は自分に POST リクエストを送信しようとしているので、WCF service
できません。POST the service request
can't get response.
私はWebHttpBindingを使用WCF service is hosted in Windows service
しています。PORT 8181
WCF サービス メソッド:
[OperationContract]
[WebInvoke(Method = "POST", UriTemplate = "/{cstid}/{deptid}/get/customer/?cstname={cstname}",
BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Json,
ResponseFormat = WebMessageFormat.Json)]
Customer CustomerGet(string cstid, string deptid, string cstname);
JQuery POST メソッド
jQuery.ajax({
type: 'POST',
url: 'http://localhost:8181/mysite/e48/91/get/customer/?',
dataType: 'json',
contentType: "application/json; charset=utf-8",
processData: false,
success: function (data) {
alert(data); // not getting anything :(
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert('Error :' + textStatus);
}
});
このサービスを呼び出せない理由と、この問題の解決方法を教えてください。
前もって感謝します!