Author: atsushi
Date: 2008-02-14 13:58:30 -0500 (Thu, 14 Feb 2008)
New Revision: 95678

Modified:
   
trunk/olive/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog
   
trunk/olive/class/System.ServiceModel/System.ServiceModel.Dispatcher/EndpointDispatcher.cs
Log:
2008-02-14  Atsushi Enomoto  <[EMAIL PROTECTED]>

        * EndpointDispatcher.cs : moved AddressFilter application only when
          DispatchOperation was not selected (it is sort of workaround).



Modified: 
trunk/olive/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog
===================================================================
--- 
trunk/olive/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog  
    2008-02-14 18:36:36 UTC (rev 95677)
+++ 
trunk/olive/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog  
    2008-02-14 18:58:30 UTC (rev 95678)
@@ -1,3 +1,8 @@
+2008-02-14  Atsushi Enomoto  <[EMAIL PROTECTED]>
+
+       * EndpointDispatcher.cs : moved AddressFilter application only when
+         DispatchOperation was not selected (it is sort of workaround).
+
 2007-08-19  Atsushi Enomoto  <[EMAIL PROTECTED]>
 
        * DefaultMessageOperationFormatter.cs : Fixed SerializeReply() for

Modified: 
trunk/olive/class/System.ServiceModel/System.ServiceModel.Dispatcher/EndpointDispatcher.cs
===================================================================
--- 
trunk/olive/class/System.ServiceModel/System.ServiceModel.Dispatcher/EndpointDispatcher.cs
  2008-02-14 18:36:36 UTC (rev 95677)
+++ 
trunk/olive/class/System.ServiceModel/System.ServiceModel.Dispatcher/EndpointDispatcher.cs
  2008-02-14 18:58:30 UTC (rev 95678)
@@ -159,8 +159,6 @@
                void ProcessRequestCore (IReplyChannel reply, IServiceChannel 
cch, RequestContext rc)
                {
                        ServiceEndpoint se = channel_dispatcher.ServiceEndpoint;
-                       if (IsMessageFilteredOut (rc.RequestMessage))
-                               throw new EndpointNotFoundException 
(String.Format ("The request message has the target '{0}' which is not 
reachable in this service contract", rc.RequestMessage.Headers.To));
 
                        Message req = rc.RequestMessage;
                        Message res = null;
@@ -179,8 +177,22 @@
                                if (res == null)
                                        op = 
DispatchRuntime.UnhandledDispatchOperation;
                        }
-                       if (res == null)
+
+                       if (res == null) {
+                               // FIXME: AddressFilter is likely applied before
+                               // an input is delivered to EndpointDispatcher. 
+                               // This means, we likely have to make some
+                               // conceptual changes to channel dispatcher and
+                               // endpoint dispatcher.
+                               // For now I moved AddressFilter here so that
+                               // WebHttpDispatchOperationSelector to select 
+                               // operation before the Message is filtered out.
+                               if (IsMessageFilteredOut (req))
+                                       throw new EndpointNotFoundException 
(String.Format ("The request message has the target '{0}' which is not 
reachable in this service contract", rc.RequestMessage.Headers.To));
+
                                res = op.ProcessRequest (req);
+                       }
+
                        if (res == null)
                                throw new InvalidOperationException 
(String.Format ("The operation '{0}' returned a null message.", op.Action));
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to