问题描述
我有一个可移植的类库.我在其中添加了服务参考.
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????
推荐答案
如果要创建一个非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 theMessageVersion to None.
正在使用(Message message = Message.CreateMessage(MessageVersioin.None,para))
using(Message message=Message.CreateMessage(MessageVersioin.None,para))
{//WriteMessage
{//WriteMessage
}
最好的问候.
这篇关于如何在可移植类库中设置MessageContractAttribute.IsWrapped = false的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!