2 // SecurityOutputFilter.cs: Security SOAP Output Filter
5 // Sebastien Pouliot (spouliot@motus.com)
7 // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
13 using Microsoft
.Web
.Services
.Xml
;
16 namespace Microsoft
.Web
.Services
.Security
{
18 public class SecurityOutputFilter
: SoapOutputFilter
{
20 public SecurityOutputFilter () {}
22 public override void ProcessMessage (SoapEnvelope envelope
)
25 throw new ArgumentNullException ("envelope");
27 if ((envelope
.Context
.Security
.Tokens
.Count
> 0) || (envelope
.Context
.Security
.Elements
.Count
> 0)) {
28 XmlElement security
= envelope
.Context
.Security
.GetXml (envelope
);
29 envelope
.Header
.AppendChild (security
);
32 if (envelope
.Context
.ExtendedSecurity
.Count
> 0) {
33 foreach (Security s
in envelope
.Context
.ExtendedSecurity
) {
34 envelope
.Header
.AppendChild (s
.GetXml (envelope
));