Nevermind.  The fundamental issue was that the json object wrapped in
the callback name does, in fact, need to be written to the Response.
I'm an idiot.  Anyway, it's working now.  If others hit the same
jquery -> jsonp -> wcf issue let me know.

On Oct 10, 12:07 pm, tenaciousd <[EMAIL PROTECTED]> wrote:
> I'm using jQuery $.ajax to make a cross-domain jsonp call to a WCF
> service.  The call is working fine, entering the service endpoint, but
> the callback method never fires.  I've tried many permutations of
> changes and can't seem to get this to work.
>
> The WCF endpoint is returning a string (NOT doing a Response.Write)
> that contains a json object inside the callback wrapper (e.g.
> "jsonp123( {"Author":"John Doe","Price":"$35.90"} )" ) and the content-
> type returned from the service is application/json; charset=utf-8.
>
> $.ajax call is below.  Any help is much appreciated.
>
>         var data = {"ISBN" : $("#isbn1").val()};
>
>         $.ajax({
>                 type: "GET",
>                 cache: false,
>                 url: "http://localhost:63132/Widget.svc/GetProductInfo";,
>                 scriptCharset: "utf-8",
>                 dataType: "jsonp",
>                 data: data,
>                 success: function(data, textStatus){
>                         alert("success");
>                 },
>                 error: function(XMLHttpRequest, textStatus, errorThrown){
>                         alert('error');
>                 }
>         });

Reply via email to