Now i am working with WCF Rest Service
Now i am trying WCF Duplex Communication in WCF REST Service
Currently i am calling service through jquery AJAX and getting response back to it
Like this:
$.ajax({
type: varType, //GET or POST or PUT or DELETE verb
url: varUrl, // Location of the service
data: varData, //Data sent to server
contentType: varContentType, // content type sent to server
dataType: varDataType, //Expected data format from server
processdata: varProcessData, //True or False
crossDomain: true,
cache: varCache,
timeout: 200000,
success: function (response) {// When Service call success
var names = response.d;
alert(names);
},
error: function (xhr) {// When Service call fails
alert(xhr.responseText);
}
});
But in duplex communication there is a call back contract in the service which service communicate later to the client.
How can i get the response of the call back contract in jquery ajax ?