开发者

Calling a webservice in javascript

开发者 https://www.devze.com 2022-12-25 01:41 出处:网络
I am trying to make a Firefox extension which will use a webservice. I was looking online to find a way to do this. I was wondering if someone could explain what the following objects/methods do:

I am trying to make a Firefox extension which will use a webservice. I was looking online to find a way to do this. I was wondering if someone could explain what the following objects/methods do:

service.useService(___,开发者_开发问答 ___);

service.<Service Name>.callService();

If there is an alternative that does not include these objects, I would be happy to hear about it.

Thank you very much


It appears you are using IE specific code to call the webservice, and according to this response it may not be supported in newer browsers now:

http://www.eggheadcafe.com/software/aspnet/31984555/you-can-use-xmlhttpreques.aspx

For more on the service.useservice function you may find this page helpful: http://www.15seconds.com/Issue/040708.htm

If you have control over the web service then you can get it to either reply with a JSON or use a REST web service, as well as a SOAP web service, as javascript can work well with REST, or with a form-based (POST/GET) web service, as opposed to SOAP.

0

精彩评论

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

关注公众号