Message::GetBody Method
Retrieves the body of this Message instance.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
| Name | Description | |
|---|---|---|
![]() | GetBody<T>() | Retrieves the body of this Message instance. |
![]() | GetBody<T>(XmlObjectSerializer^) | Retrieves the body of this Message using the specified serializer. |
After a message is created, the message body can be read using the GetBody methods on the returned message. The returned object encapsulates all the child elements within the Body element. Because the body of a message is a stream, it can only be written once, or read once.
Use the GetBody<T>(XmlObjectSerializer^) overload when working with JSON messages; the GetBody<T>() overload does not work.
