Variables for UriTemplate query values ββmust have types that can be converted by QueryStringConverter. There are no null types.
You can wrap the parameters and pass them through POST as such;
[DataContract(Name = "Details", Namespace = "")] public class Details { [DataMember] public Int32 AccNo; [DataMember] public Int32 CostCentreNo; [DataMember] public Int32 TransactionType; [DataMember] public Boolean Outstanding; [DataMember] public DateTime? CheckStartDate; [DataMember] public DateTime? CheckEndDate; public Details() {} } [OperationContract] [WebInvoke(Method = "POST", UriTemplate = "/Transactions", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Bare)] List<Transactions> GetTransactions(Details details);
Again, you can pass the date as a string instead of a DateTime, and then use DateTime.Parse () in the string on the receiving side.
Avilan
source share