Earlier this week I had an ESB endpoint (Off-Ramp in ESB parlance) that I was sending to over http using WCF-BasicHttp. I needed to switch the protocol to https: which I did by changing my UDDI Binding over to https: No problem from a management perspective; however, when I tried to run the process I saw this exception:
Event Type: Error
Event Source: BizTalk Server 2009
Event Category: BizTalk Server 2009
Event ID: 5754
Time: 2:58:23 PM
A message sent to adapter "WCF-BasicHttp" on send port "SPDynamic.XXX.SR" with URI "https://XXXXXXXXX.com/XXXXXXX/whatever.asmx" is suspended.
Error details: System.ArgumentException: The provided URI scheme 'https' is invalid; expected 'http'.
Parameter name: via
at System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
at System.ServiceModel.Channels.HttpChannelFactory.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
at System.ServiceModel.Channels.HttpChannelFactory.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
at System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
at System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
at System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
at System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
at System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
at System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.GetChannel[TChannel](IBaseMessage bizTalkMessage, ChannelFactory`1& cachedFactory)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendMessage(IBaseMessage bizTalkMessage)
I knew from a previous experience that I likely needed to set the SecurityMode setting for my Send Port. But how do you do this for a Dynamic port (which I was using since this is an ESB solution)?
Within the UDDI portal you have to add an additional Instance Info to your Binding named:
Then you have to set its value to:
The EndPointConfig is how the ESB Toolkit 2.0 provides extensibility for the various transports. To see what the key-value pair options are for a given transport, open up an itinerary and change one of your resolvers to a “static” resolver by setting the “Resolver Implementation” to Static. Then select a “Transport Name” ”, for instance to WCF-BasicHttp. At this point you can then click on the “EndPoint Configuration” property for to see an adapter/ramp specific properties dialog (key-value pairs.)
Here’s the dialog that popped up for WCF-BasicHttp:
I simply set the SecurityMode to Transport. Please note that you will get different properties within the window depending on the Transport Name you select for the resolver.
When you are done with your settings, export the itinerary to disk and find that xml; then find that resolver’s xml within that file. It will look like endpointConfig=SecurityMode=Transport in this case. Note that if you set additional properties you will have additional key-value pairs after endpointConfig=
Copy that string and paste it into the UDDI portal for you Binding’s EndPointConfig Instance Info value.