通过Java脚本调用WCF服务 [英] Invoking WCF service through java script
本文介绍了通过Java脚本调用WCF服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
通过Java脚本调用WCF服务.
我写了一个方法来调用服务,一切都很好,但是在将url附加到方法上却面临问题.
此应用程序为iPhone应用程序.
请帮帮我.
在此先感谢.
解决方案
REST( RE 代表性 S tate T ranfer )将帮助您实现这一目标.
尝试文章@
使用WCF创建REST服务 [ http://karnicki.eu/2011 /02/rest-wcf-net-4-0-service-with-json-jsonp-for-jquery/ [ http://blogs.microsoft.co.il/blogs/gilf/archive/2010/07/04/calling-a-wcf-data-service-from-jquery.aspx [ http://stephenwalther. com/blog/archive/2010/03/30/using-jquery-and-odata-to-insert-a-database-record.aspx [ 解决方案
REST (REpresentational State Tranfer) will help you achieve that.
Try articles @
Create REST Service using WCF[^]
http://karnicki.eu/2011/02/rest-wcf-net-4-0-service-with-json-jsonp-for-jquery/[^]
I don''t connect directly from the client with my WCF services.
Another thing I have is that most of my services are not exposed to the outside of the server or I want them secured under forms authentication.
So, for this what I do is create an Handler (ASHX) that acts as a controller that can transform the information that comes and goes.
On the client O call a method on the ASHX that to its thing (call a service or whatever), does all the necessary transformations (if any) and return the result back to the client.
Hi,
check these links below, this works for me
http://blogs.microsoft.co.il/blogs/gilf/archive/2010/07/04/calling-a-wcf-data-service-from-jquery.aspx[^]
http://stephenwalther.com/blog/archive/2010/03/30/using-jquery-and-odata-to-insert-a-database-record.aspx[^]
这篇关于通过Java脚本调用WCF服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文