How to validate outbound messages on the client

J.D. Meier, Jason Taylor, Prashant Bansode, Carlos Farre, Madhu Sundararajan, Steve Gregersen.

Implement the BeforeSendRequest of the interface IClientMessageInspector of the message inspector to validate outbound messages on the client. This allows you to validate the message after serialization, but before sending the request to the service.
object IClientMessageInspector.BeforeSendRequest(ref System.ServiceModel.Channels.Message request, System.ServiceModel.IClientChannel channel)
{
    validateMessage(ref request);
    return null;
}            

Last edited May 8, 2008 at 6:29 AM by prashantbansode, version 1

Comments

No comments yet.