This documentation is archived and is not being maintained.

MessagePart Class

Allows messages to be broken up into their logical units, with specific abstract information for each part. This class cannot be inherited.

For a list of all members of this type, see MessagePart Members.


[Visual Basic]
NotInheritable Public Class MessagePart
   Inherits DocumentableItem
public sealed class MessagePart : DocumentableItem
public __gc __sealed class MessagePart : public DocumentableItem
public class MessagePart extends DocumentableItem

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


The MessagePart class corresponds to a Web Services Description Language (WSDL) <part> element enclosed by the <message> element, which is in turn enclosed by the <definitions> root element. For more information about WSDL, see the specification at


[Visual Basic, C#, C++] The following example demonstrates a typical use of the MessagePart class. The element and targetNamespace parameters are user-defined strings passed into this method call.

[Visual Basic] 
Dim myMessagePart As New MessagePart()
myMessagePart.Name = partName
myMessagePart.Element = New XmlQualifiedName(element, targetNamespace)

MessagePart myMessagePart = new MessagePart();
myMessagePart.Name = partName;
myMessagePart.Element = new XmlQualifiedName(element,targetNamespace);

MessagePart* myMessagePart = new MessagePart();
myMessagePart->Name = partName;
myMessagePart->Element = new XmlQualifiedName(element,targetNamespace);

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Namespace: System.Web.Services.Description

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: System.Web.Services (in System.Web.Services.dll)

See Also

MessagePart Members | System.Web.Services.Description Namespace | Message