在C#DotNet Web服务中实现WS-Addressing

时间:2010-03-09 10:34:24

标签: c# visual-studio-2008 wcf web-services header

我正在使用VS2008在C#中构建Web服务,并希望实现WS-Addressing,因此消息头看起来如下所示:

我需要在VS2008中添加/执行哪些操作才能实现此目的?

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
 xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
 xmlns:wsa="http://www.w3.org/2005/08/addressing"
 xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsssecurity-secext-1.0.xsd"
 xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
 xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">
 <soap:Header>
  <wsa:To>http://messagehandler.org.com/sendmessage</wsa:To>
  <wsa:ReferenceParameters>
  </wsa:ReferenceParameters>
  <wsa:From>
   <wsa:EndpointReference>
    <wsa:Address>http://www.thirdparty.com/address</wsa:Address>
   </wsa:EndpointReference>
  </wsa:From>
  <wsa:Action>http://www.org.com/ServiceName</wsa:Action>
  <wsa:MessageID>urn:uuid:18367C02-8286-487b-9D35-D2EDC974ACF8</wsa:MessageID>
  <wsa:RelatesTo>urn:uuid:346CC216-5C14-496d-B6EA-7B644CAF6D48</wsa:RelatesTo>
  <wsse:Security>
  </wsse:Security>
 </soap:Header>

0 个答案:

没有答案