Problems with tempuri (or other namespaces)

Apr 28, 2009 at 2:46 PM
Edited Apr 28, 2009 at 3:26 PM
When you add headers to your client proxy as you show in doc, there is a problem if your name space finish with /. For example

Why? In SoapHeadersClientHook.cs, line 86. You do this:

string action = contractDescription.Namespace + "/" + contractDescription.Name + "/" + op.Name;

And action, at the end, is "" with two slashs.

Next, when client interceptor try to recover headers (SoapHeadersClientHook.cs, ln 54)

   if (headersFromAction.TryGetValue(request.Headers.Action, out operationHeaders))

the Action doesn't match

is that we need, but we have

Pherhaps there is another way to build uris without concat strings, for example:

Uri contractDescriptionUri=new Uri(contractDescription.Namespace);
//uri put slash when convert to string.
string action = contractDescriptionUri.ToString()  + contractDescription.Name + "/" + op.Name;

Thx for your work