This documentation is archived and is not being maintained.
ServiceDescription::Messages Property
Visual Studio 2010
Gets the collection of Message elements contained in the ServiceDescription.
Assembly: System.Web.Services (in System.Web.Services.dll)
The MessageCollection returned by this property corresponds to the list of message elements enclosed by the Web Services Description Language (WSDL) definitions root element. For more information about WSDL, see the specification at http://www.w3.org/TR/wsdl/.
ServiceDescription^ myDescription = gcnew ServiceDescription; myDescription = ServiceDescription::Read( "MyWsdl_CS.wsdl" ); myDescription->Name = "MyServiceDescription"; Console::WriteLine( "Name: {0}", myDescription->Name ); MessageCollection^ myMessageCollection = myDescription->Messages; // Remove the message at index 0 from the message collection. myMessageCollection->Remove( myDescription->Messages[ 0 ] ); // Build a new message. Message^ myMessage = gcnew Message; myMessage->Name = "AddSoapIn"; // Build a new MessagePart. MessagePart^ myMessagePart = gcnew MessagePart; myMessagePart->Name = "parameters"; XmlQualifiedName^ myXmlQualifiedName = gcnew XmlQualifiedName( "s0:Add" ); myMessagePart->Element = myXmlQualifiedName; // Add MessageParts to the message. myMessage->Parts->Add( myMessagePart ); // Add the message to the ServiceDescription. myDescription->Messages->Add( myMessage ); myDescription->Write( "MyOutWsdl.wsdl" );
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: