This documentation is archived and is not being maintained.
ServiceDescriptionCollection.GetMessage Method
.NET Framework 1.1
Searches the ServiceDescriptionCollection and returns the Message with the specified name that is a member of one of the ServiceDescription instances contained in the collection.
[Visual Basic] Public Function GetMessage( _ ByVal name As XmlQualifiedName _ ) As Message [C#] public Message GetMessage( XmlQualifiedName name ); [C++] public: Message* GetMessage( XmlQualifiedName* name ); [JScript] public function GetMessage( name : XmlQualifiedName ) : Message;
Parameters
- name
- The XmlQualifiedName, passed by reference, whose Name property is shared by the Message returned.
Return Value
A Message.
Exceptions
| Exception Type | Condition |
|---|---|
| Exception | The specified Message is not a member of any ServiceDescription instances within the collection. |
Example
[Visual Basic] ' Construct an XML qualified name. Dim myXmlQualifiedName As _ New XmlQualifiedName("AddSoapIn", "http://tempuri2.org/") ' Get the Message from the collection. Dim myMessage As Message = myCollection.GetMessage(myXmlQualifiedName) [C#] // Construct an XML qualified name. XmlQualifiedName myXmlQualifiedName = new XmlQualifiedName("AddSoapIn", "http://tempuri2.org/"); // Get the Message from the collection. Message myMessage = myCollection.GetMessage(myXmlQualifiedName); [C++] // Construct an XML qualified name. XmlQualifiedName* myXmlQualifiedName = new XmlQualifiedName(S"AddSoapIn", S"http://tempuri2.org/"); // Get the Message from the collection. myCollection->GetMessage(myXmlQualifiedName);
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button
in the upper-left corner of the page.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also
ServiceDescriptionCollection Class | ServiceDescriptionCollection Members | System.Web.Services.Description Namespace
Show: