从下面的代码片段中,我如何摆脱(xml 节点)<wsu:Expires> 标记?我想摆脱它或将其作为空元素传递。它是 objClient.RequestSoapContext.Security.Timestamp.Expires 中的只读属性。任何帮助表示赞赏。
<wsse:Security soap:mustUnderstand="1">
<wsu:Timestamp wsu:Id="Timestamp-26d09d54-10ef-4141-aa2c-11c75ed8172b">
<wsu:Created>2010-03-08T15:32:16Z</wsu:Created>
<wsu:Expires>2010-03-08T15:37:16Z</wsu:Expires>
</wsu:Timestamp>
<wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="SecurityToken-7c9b80ec-98e9-4e41-af2e-ad37070cbdd3">
<wsse:Username>bubba</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">dsfdfsdfsfs+-dasdf=</wsse:Password>
<wsse:Nonce>QQ3C4HUfO2CyGx7HrjzMzg==</wsse:Nonce>
<wsu:Created>2010-03-08T15:32:16Z</wsu:Created>
</wsse:UsernameToken>
</wsse:Security>
我已经找到并致力于实施:http: //blogs.msdn.com/dhrubach/archive/2008/06/16/modifying-the-security-header-generated-by-wse-runtime.aspx - 它不起作用为了我
注意:仍在使用我上面发布的链接中描述的方法。
编辑 2:我现在可以使用断言手动生成大部分标题。将密码插入安全标头 XML 时如何对密码进行哈希处理