在WCF服务中获取body属性XML [英] Get body attribute XML in WCF service
本文介绍了在WCF服务中获取body属性XML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
i需要从我的WCF路由器服务中获取一个属性。
xml正文部分如下所示:
Hi,
i need to get one attribute out of my incomming request to my WCF Router Service.
the xml body part looks like this :
<s:body>
<getdata xmlns="http://tempuri.org/">
<sc>45f8e09c-cf63-4e6b-8c7e-01e1b746e97d
i需要< sc>的价值
你知道如何以简单的方式达到这个目标吗?
我尝试过的事情:
消息.GetBodyAttribute(sc,http://tempuri.org/\")
i need the value of <sc>
do you have any idea how to get to this in a simple way ?
What I have tried:
message.GetBodyAttribute("sc", "http://tempuri.org/")
推荐答案
请检查:
这个
一旦你在代码中将消息作为XML文档,就可以使用后代,元素,......或其他任何东西
Hi,
Please check:
this
once you have the message as an XML document in your code you could use descendants, element, ... or whatever
这篇关于在WCF服务中获取body属性XML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文