Export (0) Print
Expand All

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.

System.Object
   System.Web.Services.Description.DocumentableItem
      System.Web.Services.Description.MessagePart

[Visual Basic]
NotInheritable Public Class MessagePart
   Inherits DocumentableItem
[C#]
public sealed class MessagePart : DocumentableItem
[C++]
public __gc __sealed class MessagePart : public DocumentableItem
[JScript]
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.

Remarks

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 http://www.w3.org/TR/wsdl/.

Example

[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)
myMessage.Parts.Add(myMessagePart)

[C#] 
MessagePart myMessagePart = new MessagePart();
myMessagePart.Name = partName;
myMessagePart.Element = new XmlQualifiedName(element,targetNamespace);
myMessage.Parts.Add(myMessagePart);

[C++] 
MessagePart* myMessagePart = new MessagePart();
myMessagePart->Name = partName;
myMessagePart->Element = new XmlQualifiedName(element,targetNamespace);
myMessage->Parts->Add(myMessagePart);

[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.

Requirements

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

Show:
© 2014 Microsoft