**** Merged from MCS ****
[mono-project.git] / mcs / class / Microsoft.Web.Services / Microsoft.Web.Services / SoapInputFilter.cs
blobcaffff6ccce30cf10b9b99d432e7bb77a7670740
1 //
2 // SoapIntputFilter.cs: SOAP Input Filter
3 //
4 // Author:
5 // Sebastien Pouliot (spouliot@motus.com)
6 //
7 // (C) 2002, 2003 Motus Technologies Inc. (http://www.motus.com)
8 //
10 using System;
11 using System.Xml;
13 namespace Microsoft.Web.Services {
15 public abstract class SoapInputFilter {
17 public SoapInputFilter () {}
19 [MonoTODO("always return true - for now")]
20 protected virtual bool CanProcessHeader (XmlElement header, SoapContext context)
22 if (header == null)
23 throw new ArgumentNullException ("header");
24 if (context == null)
25 throw new ArgumentNullException ("context");
26 // The header can be processed if any of the following conditions are true:
27 // 1. Actor is equal to ActorNext.
28 if (context.Actor.AbsoluteUri == Soap.ActorNext)
29 return true;
30 // 2. Actor matches this node.
31 // 3. Actor is empty and the IsIntermediary property of context is false.
32 //if ((context.Actor == null) && (context.IsIntermediary))
33 return true;
34 //return false;
37 public abstract void ProcessMessage (SoapEnvelope envelope);