Reputation: 13
So I need a SOAP extension for the project I'm working on. I made a C# class that extends SoapExtension, and added a reference to it in web.config. But it's not being run. The class should mung any data that goes through it, but I can run web services (Using SoapUI) and the output is not munged. I think the problem is either with the config files or the namespace.
Here's my web.config:
<system.web>
<compilation debug="true"></compilation>
<httpRuntime targetFramework="4.5"/>
<webServices>
<soapExtensionTypes>
<add type="MySolution.Common.SoapClass" priority="3" group="High" />
</soapExtensionTypes>
</webServices>
</system.web>
Some examples have more stuff in the type
attribute.
And here's the munging function from my class:
public override Stream ChainStream(Stream stream)
{
MemoryStream mStream = new MemoryStream();
StreamWriter sw = new StreamWriter(mStream );
sw.Write("<soap>Testing</soap>");
return mStream ;
}
Obviously this will be replaced once I know it's working. What am I doing wrong?
Upvotes: 1
Views: 619