views:

440

answers:

4

Hi,

I'm developing a Firefox addon that needs to interact with an external WebService
The WebSerivce is build using ASP.NET (.asmx page)

I cannot use ajax because it's an addon and not a web site.
Does anyone knows how to do it?

+2  A: 

If you would like to do it all manually you need to use the XMLHttp Object. This however can become quite painfull, and that is the reason why there is a lot of Javascript libaries, to make the task of getting and sending data less painful.

Rihan Meij
A: 

Check Out Call an ASP.NET web service from JavaScript

Green Techy
+1  A: 

Check out this link: It clearly mentions that XMLHttpRequest can be used from Mozilla extensions. https://developer.mozilla.org/En/Using_XMLHttpRequest#Downloading_JSON.c2.a0and_JavaScript_from_extensions

Here Be Wolves
+1  A: 

You will need to consider the cross domain issues initiating a call from your Add-On to the service.

The XMLHttpRequest object is one of the fundamental building blocks of AJAX. I'm unsure about the isolation of your Add-On but it seems strange that you would be unable to use it.

The language the web service is created with is unimportant you just need to know which web service protocol it requries. Just as when you visit a website you are able to be agnostic to whether it is php, asp or jsp producing the HTML you just need to know how to handle the HTML.

Dave Anderson