从浏览器调用WCF服务 [英] Invoke WCF service from browser
本文介绍了从浏览器调用WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是WCF的新手并学习一些基础知识。
我有一个名为'Employee'的WCF Web服务和两个方法AddEmployee(POST方法)和DeleteEmployee(DELETE方法)具有相同的Uri模板'/ Employees / {id }。
如何通过具有相同UriTemplate的浏览器执行方法????
解决方案
你可以使用,JQuery ..
jQuery.support.cors = true;
>
.ajax({
crossDomain:true,
url:,
类型:POST,
dataType:xml,
数据:soapMessage,
});
http://jquery.com/ [ ^
Hi,
I'm new to WCF and learning some basics.
I have a WCF web service named 'Employee' and two methods AddEmployee(POST method) and DeleteEmployee(DELETE method) having same Uri template '/Employees/{id}'.
How can i execute the methods through the browser which have same UriTemplate ????
解决方案
you can use, JQuery..
jQuery.support.cors = true;
.ajax({
crossDomain: true,
url: "",
type: "POST",
dataType: "xml",
data: soapMessage,
});
http://jquery.com/[^]
这篇关于从浏览器调用WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文