views:

42

answers:

1

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.

A: 

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..

pc1oad1etter