开发者

How do I talk to a WCF service from a Firefox extension?

I wrote a simple WCF service and verified I could call it from an asp.net web application. Now i want to call the same service from a firefox extension.

Looking at the example here, http://dotnetbyexample.blogspot.com/2008/02/calling-wcf-service-from-javascript.html I figured if i get the javascript 开发者_开发百科proxy in step 7, I will be able to call it from the javascript in my firefox extension.

But when i load firefox with the extension, it says "Type undefined" in the error console and points to the Type.registerNamespace line at the start of the javascript proxy.

Does the generated proxy only work from another .net application? How should I be going about this?

Update: https://developer.mozilla.org/en/SOAP_in_Gecko-based_Browsers talks about how to deal with calling a web service from Firefox. So if we have the wsdl for the wcf service we should be able to do this from the extension.


Use WCF to return plain xml (not SOAP) or JSON. JSON may be an excellent choice for sure, because you will be consuming from xul/JS..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜