Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I'm quite a beginner in this feild. i'm trying to implement this code as an exersice. i want to create a soapfilter that will run as a soap message arrives. I'm having trouble with the policy XML</p> <pre><code>using Microsoft.Web.Services3; using Microsoft.Web.Services3.Design; namespace WebService1 { /// &lt;summary&gt; /// Summary description for Service1 /// &lt;/summary&gt; [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ToolboxItem(false)] public class Service1 : System.Web.Services.WebService { [WebMethod] public string HelloWorld(string s) { return "Hello World" +s ; } } public class ValidationFilter : SoapFilter { string authCode; public ValidationFilter(string authCode) { this.authCode = authCode; } public override SoapFilterResult ProcessMessage( SoapEnvelope envelope) { XmlReaderSettings settings = new XmlReaderSettings(); XmlElement elmRoot = envelope.DocumentElement; XmlElement elmNew = envelope.CreateElement("title1234"); elmNew.InnerXml = "blablabla"; elmRoot.AppendChild(elmNew); return SoapFilterResult.Continue; } } public class traceAssertion : PolicyAssertion { public static readonly XmlQualifiedName BeNiceQName = new XmlQualifiedName("traceAssertion", "http://schemas.cohowinery.com/wsbn"); public override SoapFilter CreateClientInputFilter(FilterCreationContext context) { return new ValidationFilter("FFFF"); } public override SoapFilter CreateClientOutputFilter(FilterCreationContext context) { return new ValidationFilter("FFFF"); } public override SoapFilter CreateServiceInputFilter(FilterCreationContext context) { return new ValidationFilter("FFFF"); } public override SoapFilter CreateServiceOutputFilter(FilterCreationContext context) { return new ValidationFilter("FFFF"); } } </code></pre> <p>}</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload