Using Message Contracts

. Sunday, January 8, 2012
  • Agregar a Technorati
  • Agregar a Del.icio.us
  • Agregar a DiggIt!
  • Agregar a Yahoo!
  • Agregar a Google
  • Agregar a Meneame
  • Agregar a Furl
  • Agregar a Reddit
  • Agregar a Magnolia
  • Agregar a Blinklist
  • Agregar a Blogmarks

Future WCF developers will frequently define service and message contracts, but using mes-
sage contracts to explicitly define the message structure will likely be less common. This can
prove useful if you need to interoperate with another (non-WCF) service, which requires a
particular message format.
To define a message contract, you use the MessageContract, MessageHeader, and
MessageBody attributes as shown here:

Future WCF developers will frequently define service and message contracts, but using mes-
sage contracts to explicitly define the message structure will likely be less common. This can
prove useful if you need to interoperate with another (non-WCF) service, which requires a
particular message format.
To define a message contract, you use the MessageContract, MessageHeader, and
MessageBody attributes as shown here:

0 comments: