如何在可移植类库中设置MessageContractAttribute.IsWrapped = false [英] how to set MessageContractAttribute.IsWrapped=false in Portable Class library

查看:80
本文介绍了如何在可移植类库中设置MessageContractAttribute.IsWrapped = false的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个可移植的类库.我在其中添加了服务参考.

I have a portable class library. In which i have added a service reference.

我想在我的肥皂请求中删除包装纸.但是没有类似"MessageContractAttribute.IsWrapped"的属性

I want to remove wrapper in my soap request. but there is no property like "MessageContractAttribute.IsWrapped" in Portable Class library.. so what is the solution for it????

推荐答案

您好Chintan,

Hi Chintan,

如果要创建一个非SOAP消息,该消息仅包含< Body>内部的内容, SOAP消息,只需设置 MessageVersion 更改为无".

If you want to create a non SOAP message which just inludes the content inside the <Body> of a SOAP message, just set the MessageVersion to None.

正在使用(Message message = Message.CreateMessage(MessageVersioin.None,para))

using(Message message=Message.CreateMessage(MessageVersioin.None,para))

{//WriteMessage

{//WriteMessage

}

最好的问候.


这篇关于如何在可移植类库中设置MessageContractAttribute.IsWrapped = false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆