0

I created a WCF self hosted web service. Here are my serviceContract and OperationContract in Instace class:

[ServiceContract]
public interface ISwiperWS
{   

[OperationContract, WebInvoke(Method = "GET", UriTemplate = "/getstatus?callback={Callback}", ResponseFormat = WebMessageFormat.Json)]
String getStatus(String Callback);
}

TestWS.cs

public String getStatus()
{
  return "true"
}

I am accessing the endpoint of this web service from JsonP written in GWT

String url = "https://somedomain.com:8083/getstatus";
JsonpRequestBuilder jsonp = new JsonpRequestBuilder();
jsonp.setTimeout(600);
jsonp.setCallbackParam("callback");
jsonp.send(url);

I create a setup project and installed it on different-different machine. Whenever i am making a request to web service endpoints from JsonP It is showing an strange behavior. In some machine i am getting an expected response where as in some other machine it continuously showing an error i.e. 405-method are not allowed.

I searched it for and make change according to them but nothing works for me. Please suggest me a solutoin

Amit Pal
  • 9,143
  • 23
  • 64
  • 141

1 Answers1

1

May be: I believe it had something to do with your jquery ajax call using jsonp. If you are going to change it to just json the post will work..

Harry
  • 71
  • 1
  • 4
  • Please, try to read this http://stackoverflow.com/about, to get more understanding about questions/answers here on SO. Your contribution is not answering the question. It is more a comment, which you can add once you'll increase your reputation: http://stackoverflow.com/faq#reputation – Radim Köhler Dec 30 '13 at 07:23