I developed asp.net WCF service.I have hosted it in another system.now i need to get the WCF webservice to my System using JQUERY Function.my problem is I dnt knw how to call that webservice hosted in another system.How to call external webservice from jquery?
Asked
Active
Viewed 2,095 times
1
-
google it! :http://encosia.com/using-jquery-to-consume-aspnet-json-web-services/ – Simon McLoughlin Jun 01 '12 at 10:52
2 Answers
2
You can just use the AJAX
jQuery method:
$.ajax({
url: 'http://localhost:4305/Service/YourService',
type: "GET",
success: function(data) {
alert('WCF service called');
}
});
There is also an article on Code Project to achieve this with WCF.
http://www.codeproject.com/Articles/128478/Consuming-WCF-REST-Services-Using-jQuery-AJAX-Call

Darren
- 68,902
- 24
- 138
- 144
0
Is your issue regarding cross domain scripting? Try JSONP. This will allow you to call a webservice hosted on a system w/ a different domain.