jquery - Duplex WCF Service call using javascript (AJAX) -
now working wcf rest service
now trying wcf duplex communication in wcf rest service
currently calling service through jquery ajax , getting response it
like this:
$.ajax({ type: vartype, //get or post or put or delete verb url: varurl, // location of service data: vardata, //data sent server contenttype: varcontenttype, // content type sent server datatype: vardatatype, //expected data format 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 call contract in service service communicate later client.
how can response of call contract in jquery ajax ?
also have 1 doubt, webhttpbinding support duplex communication ?
how can response of call contract in jquery ajax ?
imho receive call service client via http signalr should used. uses push technology, long-pulling , other allow this. way emulate repeatedly calling service changes.
it seems hard via wsdualhttpbinding
supports duplex communication. please see note juval lowy in "programming wcf" book states binding: "duplex callbacks nonstandard, there no industry reference states how client endpoint address passed service or how service publishes callback contract in first place."
also have 1 doubt, webhttpbinding support duplex communication ?
i believe not supported there. webhttpbinding not support sessions (reliablesession
property) , required duplex communication (see system-provided bindings).
and btw webhttpbinding superseded asp.net webapi.
Comments
Post a Comment