Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/mcs
diff options
context:
space:
mode:
authorAtsushi Eno <atsushi@ximian.com>2011-04-27 15:56:05 +0400
committerAtsushi Eno <atsushi@ximian.com>2011-04-27 15:56:05 +0400
commit798e253a6899db8b6f56f7d3345040690fea1043 (patch)
tree97c221df8d2f26692284dffb3b815dde81ba967a /mcs
parent9559a82bfc700f7a0fea48b379fbc7fdd0b1686a (diff)
Handle fault messages in duplex callback channel.
Diffstat (limited to 'mcs')
-rw-r--r--mcs/class/System.ServiceModel/System.ServiceModel/DuplexClientRuntimeChannel.cs9
1 files changed, 9 insertions, 0 deletions
diff --git a/mcs/class/System.ServiceModel/System.ServiceModel/DuplexClientRuntimeChannel.cs b/mcs/class/System.ServiceModel/System.ServiceModel/DuplexClientRuntimeChannel.cs
index 996295d609c..4fa56e12a78 100644
--- a/mcs/class/System.ServiceModel/System.ServiceModel/DuplexClientRuntimeChannel.cs
+++ b/mcs/class/System.ServiceModel/System.ServiceModel/DuplexClientRuntimeChannel.cs
@@ -171,6 +171,15 @@ namespace System.ServiceModel.MonoInternal
}
}
+ if (message.IsFault) {
+ Exception ex;
+ var mf = MessageFault.CreateFault (message, 0x10000);
+ if (FaultConverter.GetDefaultFaultConverter (message.Version).TryCreateException (message, mf, out ex)) // FIXME: get maxMessageSize somehow
+ throw ex;
+ else
+ throw new FaultException (mf);
+ }
+
if (!MessageMatchesEndpointDispatcher (message, Runtime.CallbackDispatchRuntime.EndpointDispatcher))
throw new EndpointNotFoundException (String.Format ("The request message has the target '{0}' with action '{1}' which is not reachable in this service contract", message.Headers.To, message.Headers.Action));
new InputOrReplyRequestProcessor (Runtime.CallbackDispatchRuntime, input).ProcessInput (message);