Freigeben über


PortType.ServiceDescription-Eigenschaft

Ruft die ServiceDescription ab, zu deren Membern PortType gehört.

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

Syntax

'Declaration
Public ReadOnly Property ServiceDescription As ServiceDescription
'Usage
Dim instance As PortType
Dim value As ServiceDescription

value = instance.ServiceDescription
public ServiceDescription ServiceDescription { get; }
public:
property ServiceDescription^ ServiceDescription {
    ServiceDescription^ get ();
}
/** @property */
public ServiceDescription get_ServiceDescription ()
public function get ServiceDescription () : ServiceDescription

Eigenschaftenwert

Eine ServiceDescription.

Beispiel

Dim myPortTypeCollection As PortTypeCollection
Dim myServiceDescription As ServiceDescription = _
   ServiceDescription.Read("MathService_VB.wsdl")

myPortTypeCollection = myServiceDescription.PortTypes
Dim myPortType As PortType = myPortTypeCollection("MathServiceSoap")

' Get the ServiceDescription of myPortType.
Dim myPortTypeServiceDescription As ServiceDescription = _
   myPortType.ServiceDescription
Dim myMessageCollection As MessageCollection = _
   myPortTypeServiceDescription.Messages

Console.WriteLine("No. of messages in this ServiceDescription: " _
   & myMessageCollection.Count.ToString())

' Display all the messages.
Dim myMessage As Message
For Each myMessage In  myMessageCollection
   Console.WriteLine("Message: " & myMessage.Name)
Next myMessage 
PortTypeCollection myPortTypeCollection;
ServiceDescription myServiceDescription =
   ServiceDescription.Read("MathService_CS.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: "
   + myMessageCollection.Count);

// Display all the messages.
foreach(Message myMessage in myMessageCollection)
   Console.WriteLine("Message: " + myMessage.Name);
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());
}

Plattformen

Windows 98, Windows 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

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

PortType-Klasse
PortType-Member
System.Web.Services.Description-Namespace