Intercepting operation parameters in a strong-type manner
WCF service operation calls are serialized into SOAP XML messages over wire, which gives us opportunity to intercept the message and manipulate it. However, this kind of interception is at the raw XML message level and is not quite convenient for inspecting or manipulating strong-typed operation parameters. In such cases, WCF provides built-in interfaces for developers to intercept the input and output parameters of the service operation call. For those services in which we want to inspect or modify the operation parameters, we can define a custom parameter inspector to achieve the task. In this recipe, we will demonstrate how we can use the parameter inspector to manipulate the parameters ...
Get Microsoft Windows Communication Foundation 4.0 Cookbook for Developing SOA Applications now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.