Export (0) Print
Expand All

Message Class

Provides an abstract definition of data passed by an XML Web service. This class cannot be inherited.

Namespace: System.Web.Services.Description
Assembly: System.Web.Services (in system.web.services.dll)

public sealed class Message : NamedItem
public final class Message extends NamedItem
public final class Message extends NamedItem
Not applicable.

A Message can contain either document-oriented or procedure-oriented information. Procedure-oriented messages contain parameters and return values, while document-oriented messages contain documents.

The Message class corresponds to a Web Services Description Language (WSDL) message element enclosed by the definitions root element. For more information about WSDL, see the specification at http://www.w3.org/TR/wsdl/.

// Creates a Message with name = messageName having one MessagePart 
// with name = partName.
public static Message CreateMessage(string messageName,string partName,
   string element,string targetNamespace)
{
   Message myMessage = new Message();
   myMessage.Name = messageName;
   MessagePart myMessagePart = new MessagePart();
   myMessagePart.Name = partName;
   myMessagePart.Element = new XmlQualifiedName(element,targetNamespace);
   myMessage.Parts.Add(myMessagePart);
   return myMessage;
}

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

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2014 Microsoft