PortType.ServiceDescription Property
.NET Framework 2.0
Gets the ServiceDescription of which the PortType is a member.
Namespace: System.Web.Services.Description
Assembly: System.Web.Services (in system.web.services.dll)
Assembly: System.Web.Services (in system.web.services.dll)
PortTypeCollection^ myPortTypeCollection; ServiceDescription^ myServiceDescription = ServiceDescription::Read( "MathService_Cpp.wsdl" ); myPortTypeCollection = myServiceDescription->PortTypes; PortType^ myPortType = myPortTypeCollection[ "MathServiceSoap" ]; // Get the ServiceDescription of myPortType. ServiceDescription^ myPortTypeServiceDescription = myPortType->ServiceDescription; MessageCollection^ myMessageCollection = myPortTypeServiceDescription->Messages; Console::WriteLine( "No. of messages in this ServiceDescription: {0}", myMessageCollection->Count ); // Display all the messages. for each(Message^ myMessage in myMessageCollection) Console::WriteLine("Message: " + myMessage->Name);
PortTypeCollection myPortTypeCollection;
ServiceDescription myServiceDescription = ServiceDescription.Read(
"MathService_JSL.wsdl");
myPortTypeCollection = myServiceDescription.get_PortTypes();
PortType myPortType = myPortTypeCollection.get_Item(
"MathServiceSoap");
// Get the ServiceDescription of myPortType.
ServiceDescription myPortTypeServiceDescription =
myPortType.get_ServiceDescription();
MessageCollection myMessageCollection =
myPortTypeServiceDescription.get_Messages();
Console.WriteLine("No. of messages in this ServiceDescription: "
+ myMessageCollection.get_Count());
// Display all the messages.
for (int iCtr = 0; iCtr < myMessageCollection.get_Count(); iCtr++) {
Message myMessage = myMessageCollection.get_Item(iCtr);
Console.WriteLine("Message: " + myMessage.get_Name());
}
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.Community Additions
ADD
Show: