In order to use a custom transport with WSE2, you need to map the transport’s URI scheme to a transport provider. You can accomplish this programmatically like so:
using Microsoft.Web.Services2.Configuration.
WebServicesConfiguration.MessagingConfiguration.AddTransport( “soap.smtp”, new SoapSmtpTransport() )
Contrary to popular belief, it’s possible to do this via configuration as well – although the documentation for WSE isn’t really clear about this. After a little bit of sleuthing in Reflector, I came up with the following configuration which seems to work quite well:
<microsoft.web.services2> <messaging><transports> <add scheme = "soap.smtp" type="Net.Hyperthink.Samples.SoapSmtp.SoapSmtpTransport,
Net.Hyperthink.Samples.SoapSmtp" /></transports> </messaging></microsoft.web.services2>
