Hi friends, I have created a WCF Web Service and consumed in another application. Every thinks works fine till here. I want to call to that web serice from my client app using JQuery.
I have googled it and searched a lot and seen lot of videos and have done what they said but I did not able to call the service.
Any one Please explain the step wise procedure to do.
Thanks in Advance
Ganesh
Loading

Sukesh MarlaPosted Sep 11, 2012, 3:37 AM
Search CreatinG WCF Rest services,
You can consume them from jqery easily
using $.ajax function as follow
$.support.cors = true;
var x;
$.ajax({
type: "GET", //GET or POST or PUT or DELETE verb
url: "http://localhost/PosApp/Login/LoginService.svc/GetPosParameters", // Location of the service
contentType: "application/json; charset=utf-8", // content type sent to server
dataType: "json", //Expected data format from serv
processdata: true, //True or False
async: false,
success: function (msg)
{
//On Successfull service call
x = msg;
},
error: function (result)
{
// When Service call fails
}
});
Check this link for REST Services
http://www.codeproject.com/Articles/386956/RestFul-WCF-JSON-Service-with-client-and-on-Mozill
Check this is correct answer if it helped/