Reputation: 14285
please tell me how to consume webservice (.net) using javascript.
its SOAP.
Thanks
Upvotes: 0
Views: 4924
Reputation: 38046
Both .asmx and .svc (wcf) expose javascript enabled bindings - this is easy to find on the internet.
Example:
Normally you just append /js to the url of the endpoint and javascript providing a proxy is returned.
This proxy code relies on the ASP.NET AJAX framework, but you can easily use it with any other ajax-enabling framework by using this shim.
Upvotes: 0
Reputation: 2250
I don't think there is a Javascript library that consumes SOAP out of the box. Dojo offers a lot of functionality in that direction, RPC-calls for example, and is probably the one that comes closest. IBM did some work there that you might want to check out.
This (including Dojo) is a lot of non-trivial stuff to learn but SOAP is a nasty beast, if you really need to interface to a SOAP service with JS you will have to invest some time.
See:
http://www.ibm.com/developerworks/web/library/wa-dojowebresponse/index.html?ca=drs-
Upvotes: 0
Reputation: 498904
You use AJAX.
In particular the XMLHttpRequest
object.
Look at the jQuery ajax API - it makes AJAX easier to use.
Upvotes: 2