Adapter demands Wcf InboundTransportLocation


Regarding "WcfAdapterProperties".
In the constructor the private member "_uri" is set with value from InboundTransportLocation. That value is then used in "WcfTransmitterProperties" for "DynamicSend" and where "wcf://" is stripped off from the uri. There are situations the message has no InboundTransportLocation and "_uri" will be null, causing an error.
Either "_uri" has to get its value from either InboundTransportLocation or OutboundTransportLocation, depending on direction, or the strip function must deal with null.
See code below.


SystemMessageContext smc = new SystemMessageContext(msg.Context);
_uri = smc.InboundTransportLocation;


public void UpdateUriForDynamicSend()
 // Strip off the adapters alias
 int i = Uri.LastIndexOf("wcf://");
 if (i > 0)
      string newUri = Uri.Substring(i);
      Uri = newUri;


MartinBring wrote Dec 14, 2006 at 8:02 AM

Sorry, forgot to change the subject. It should be just "Adapter demands InboundTransportLocation".

wrote May 10, 2007 at 9:17 PM

wrote Feb 12, 2013 at 8:59 PM