Я пишу службу WCF. Вот реализация сторона ServiceПолучение нулевых значений в службе post wcf
[OperationContract(Name="GetMediaFile")]
[Description(ServiceDescConstants.GetMediaFile)]
[WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped, UriTemplate = UriTemplateConstants.GetMediaFile)]
Stream GetMediaFile(string type, string mediaId);
где
UriTemplateConstants.GetMediaFile = "GetMediaFile?type={type}&mediaId={mediaId}";
Вот реализация метода интерфейса
public Stream GetMediaFile(string type, string mediaId)
{
CustomerBL customerBl = new CustomerBL();
return customerBl.getMediaFile(Convert.ToInt32(type), Convert.ToInt32(mediaId));
}
На стороне клиента я использую RestClient плагин для тестирования сервиса. Вот данные я направляю
URL: customersite/GetMediaFile Заголовок: Content-Type = х-WWW-форм-urlencoded Body: тип = 0 & MediaId = 1
Любая помощь !!
Теперь проблема заключается в том, что я получаю нулевые значения
Thanx это работает .. – user2061951