2010-03-30 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Tue, 30 Mar 2010 07:35:56 +0000 (07:35 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Tue, 30 Mar 2010 07:35:56 +0000 (07:35 -0000)
* ChannelDispatcher.cs : for faults, use fault namespace, not that of
  ReplyAction. Added FIXME comment regarding dispatcher.

svn path=/trunk/mcs/; revision=154427

mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs

index 2fd02d25e0d9b6213c4fe0a49542c6e36fafc223..aa592ba3ec6fecba40fda861bf9a195fe0078da8 100644 (file)
@@ -1,3 +1,8 @@
+2010-03-30  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * ChannelDispatcher.cs : for faults, use fault namespace, not that of
+         ReplyAction. Added FIXME comment regarding dispatcher.
+
 2010-03-25  Atsushi Enomoto  <atsushi@ximian.com>
 
        * OperationInvokerHandler.cs : removed unused code.
index 9066a29d4e2665604531d97ee98a725b6449cc12..a24563681e3c642b9716a2e870762acac946a0f4 100644 (file)
@@ -571,7 +571,7 @@ namespace System.ServiceModel.Dispatcher
 
                                        MessageVersion version = rc.RequestMessage.Version;
                                        FaultCode fc = new FaultCode ("DestinationUnreachable", version.Addressing.Namespace);
-                                       Message res = Message.CreateMessage (version, fc, ex.Message, rc.RequestMessage.Headers.Action);
+                                       Message res = Message.CreateMessage (version, fc, ex.Message, rc.RequestMessage.Version.Addressing.FaultNamespace);
                                        rc.Reply (res);
                                } catch (Exception e) {
                                        // FIXME: log it
@@ -633,6 +633,9 @@ namespace System.ServiceModel.Dispatcher
                                return candidate;
                        }
 
+                       // FIXME: this part needs refactoring.
+                       // First, Endpoint must be identified, or return EndpointNotFound fault in case address filter didn't match anything.
+                       // Then, contract filter must be applied to identify a dispatch operation, or return ActionNotSupported fault in case contract filter didn't match anything.
                        bool MessageMatchesEndpointDispatcher (Message req, EndpointDispatcher endpoint)
                        {
                                // FIXME: handle AddressFilterMode.Prefix too.