views:

395

answers:

1

In WCF Messsage contract we have IsWrapped atribute and wrappername, wrappernamespace attribute

  • Question?

    1. What is Message wrapping
    2. What are the advantages of wrapping messages
    3. Is it secure to wrap the messages.
A: 

Theres an Article on the MSDN that discusses message contract classes. It writes

The MessageContractAttribute has an attribute named IsWrapped that indicates whether the data contracts should be wrapped. When IsWrapped is set to false, the data contracts used by a service contract will not be wrapped. When this value is set to true, the data contracts will be wrapped; in addition, you can also control the name and namespace used for the wrapper element when IsWrapped is set to true.

WrapperName and WrapperNamespace define what element the message will be wrapped with.

To put this into context, a message contract class can be used in two cases: it can be used when you use message types or when you use different namespaces for the data contracts that are used by the service contract.

Based on this description, it doesn't appear to have an effect on security.

statenjason