ServiceDescription.Services プロパティ
ServiceDescription に格納されている Service インスタンスのコレクションを取得します。
Public ReadOnly Property Services As ServiceCollection
[C#]
public ServiceCollection Services {get;}
[C++]
public: __property ServiceCollection* get_Services();
[JScript]
public function get Services() : ServiceCollection;
プロパティ値
ServiceCollection を返します。
解説
このプロパティから返される ServiceCollection は、Web サービス記述言語 (WSDL: Web Services Description Language) <definitions> ルート要素で囲まれた <service> 要素のリストに対応します。WSDL の詳細については、http://www.w3.org/TR/wsdl/ の仕様を参照してください。
使用例
' Read a ServiceDescription from existing WSDL.
Dim myServiceDescription As ServiceDescription = _
ServiceDescription.Read("Input.vb.wsdl")
myServiceDescription.TargetNamespace = "http://tempuri.org/"
' Get the ServiceCollection of the ServiceDescription.
Dim myServiceCollection As ServiceCollection = _
myServiceDescription.Services
' Remove the Service at index 0 of the collection.
myServiceCollection.Remove(myServiceDescription.Services.Item(0))
[C#]
// Read a ServiceDescription from existing WSDL.
ServiceDescription myServiceDescription =
ServiceDescription.Read("Input_CS.wsdl");
myServiceDescription.TargetNamespace = "http://tempuri.org/";
// Get the ServiceCollection of the ServiceDescription.
ServiceCollection myServiceCollection = myServiceDescription.Services;
// Remove the Service at index 0 of the collection.
myServiceCollection.Remove(myServiceDescription.Services[0]);
[C++]
// Read a ServiceDescription from existing WSDL.
ServiceDescription* myServiceDescription =
ServiceDescription::Read(S"Input_CS.wsdl");
myServiceDescription->TargetNamespace = S"http://tempuri.org/";
// Get the ServiceCollection of the ServiceDescription.
ServiceCollection* myServiceCollection = myServiceDescription->Services;
// Remove the Service at index 0 of the collection.
myServiceCollection->Remove(myServiceDescription->Services->Item[0]);
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
ServiceDescription クラス | ServiceDescription メンバ | System.Web.Services.Description 名前空間