ITPub博客

首页 > 应用开发 > > wcf如何接收 text , text/plain ,text/xml的参数

wcf如何接收 text , text/plain ,text/xml的参数

作者:dav2100 时间:2019-08-12 15:54:53 0 删除 编辑

如题 在c#中,如何接收 text , text/plain ,text/xml 这几个类型的参数,需要怎么配置

目前我的wcf服务端代码如下:

[WebInvoke(Method = "POST", RequestFormat = WebMessageFormat.Json, BodyStyle = WebMessageBodyStyle.WrappedRequest,  UriTemplate = "CallbackInvoice?AuthData={AuthData}")] 
    
        [OperationContract]
        string CallbackInvoice (string AuthData,string req);

但是只能接收 application/json的数据格式 不支持其他的

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4479/viewspace-3120590/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-10-17

  • 博文量
    176
  • 访问量
    17570