【发布时间】:2015-07-25 00:16:49
【问题描述】:
我有一种方法“CreateAccount”,如下所述
[OperationContract]
[WebInvoke(UriTemplate = "CreateAccount", Method = "POST", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.Wrapped)]
public CreateAccountServiceResponse CreateAccount(AuthenticateApplication Application, ApplicationCustomer Customer, CustomerService Service, Option Options)
{
// Some Implementation
}
如果我正在使用
BodyStyle = WebMessageBodyStyle.Wrapped
然后我无法在浏览器中找到请求/响应参数。相反,它显示为
Message direction Format Body
Request Unknown Cannot infer schema. The Request body is wrapped.
Response Unknown Cannot infer schema. The Response body is wrapped
有人可以为此提供解决方案,以便我能够找到请求/响应格式。
【问题讨论】:
-
要查看您的请求/响应的外观,您可以使用my answer to question RESTful web service body format。
-
我的要求是在浏览器中查看请求响应,即“72.5.167.17:8007/help”应该显示准确的请求和响应。 72.5.167.17:8007/CreateAccount
标签: wcf