The MessageDescription contains the Headers and Body properties to provide get access to these parts of the message. Whether the message is incoming or outgoing is indicated by the Direction property. It also provides an Action property where the URI that indicates the intension of the message may be specified.
The following example uses the MessageDescription returned from Messages property of the OperationDescription class. The code iterates through the collection of endpoints and prints each endpoint name, as well as the name of each operation in the endpoint.