JQuery.Post throwing error when calling WCF service
<p>I've written a WCF service which takes a string and returns a string. When I call it from my javascript, it causes the error alert to be displayed.</p>

<p>I've tried reading the API and unsure of what I'm doing wrong or how to display the actual error message.</p>

<p>Here is my javascript:</p>

<pre><code>var path = "http://localhost:15286/Service.svc/SubmitTest?url=" + encodeURIComponent(info.srcUrl);
var jqxhr = $.post(path, function() {

  alert("success");
})
.success(function() { alert("second success"); })
.error(function(oEvent) { alert("error"); })
.complete(function() { alert("complete"); });
};
</code></pre>

<p>I've watched the service through the debugger when it is called and it is returning the string "Hello World" without error so I assume my problem is on the javascript side.</p>

<p>WCF Service:</p>

<pre><code> [ServiceContract]
public interface IService
{
    [WebInvoke(UriTemplate = "/Submit?input={value}")]
    [OperationContract]
    string Submit(string value);
}

public class Service : IService
{
    public string Submit(string input)
    {
      return "hello world";
}
</code></pre>
