将流传递给Restfull Wcf
我正在将一个流传递给rest完整wcf服务。我将把这个流设置为有效负载,而不是uri。在这种情况下,我的uri模板是什么 我的合同是这样的:将流传递给Restfull Wcf,wcf,rest,Wcf,Rest,我正在将一个流传递给rest完整wcf服务。我将把这个流设置为有效负载,而不是uri。在这种情况下,我的uri模板是什么 我的合同是这样的: [ServiceContract] public interface IRjisProxyWcfService { [OperationContract] [WebInvoke(Method = "PUT", UriTemplate = "")] Stream Post(Stream inputStream); } 我的uri模板
[ServiceContract]
public interface IRjisProxyWcfService
{
[OperationContract]
[WebInvoke(Method = "PUT", UriTemplate = "")]
Stream Post(Stream inputStream);
}
我的uri模板是什么?上有一篇好文章 理论上它可以是任何东西。例如
[ServiceContract]
public interface IRjisProxyWcfService
{
[OperationContract]
[WebInvoke(Method = "PUT", UriTemplate = "AAA/")]
Stream Post(Stream inputStream);
}
[ServiceContract]
public interface IRjisProxyWcfService
{
[OperationContract]
[WebInvoke(Method = "PUT", UriTemplate = "AAA/BBB")]
Stream Post(Stream inputStream);
}
但是,在放置时,放置url应该是baseurl/AAA(第一种情况)或baseurl/AAA/BBB(第二种情况)
Sriwantha Sri Aravinda网站上有一篇好文章 理论上它可以是任何东西。例如
[ServiceContract]
public interface IRjisProxyWcfService
{
[OperationContract]
[WebInvoke(Method = "PUT", UriTemplate = "AAA/")]
Stream Post(Stream inputStream);
}
[ServiceContract]
public interface IRjisProxyWcfService
{
[OperationContract]
[WebInvoke(Method = "PUT", UriTemplate = "AAA/BBB")]
Stream Post(Stream inputStream);
}
但是,在放置时,放置url应该是baseurl/AAA(第一种情况)或baseurl/AAA/BBB(第二种情况)
Sriwantha Sri Aravinda您的URI模板将是空字符串,就像您指定的那样。您的URI模板将是空字符串,就像您指定的那样