I am creating a wcf service that will be consumed by the android application.
I have declared an interface like:
[OperationContract]
[WebInvoke(Method = "GET", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare, UriTemplate = "RegsiterUser")]
string RegsiterUser(RegsiterUser rUser);
In service code:
public string RegsiterUser(RegsiterUser rUser)
{
return rUser.userName;
}
I have created a class:
[DataContract]
public class RegsiterUser
{
#region Property
[DataMember]
public string userName { get; set; }
[DataMember]
public string Password { get; set; }
#endregion
}
When this service is called, then it is giving bad request error: 400
I have also tested it using postmaster app of chrome and the same is coming, so if any body has a solution, please help me. Thanks.