• Feeds

    Subscribe in a reader

  • Ads

Adding custom transports via configuration

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>
#1 Yves Reynhout on 6.03.2004 at 2:16 AM

I updated my post and referred to this one in order to set the record straight.