ServiceDescription クラス

定義

XML Web サービスの記述に必要な名前空間、要素、および属性を完全に備えた、有効な Web サービス記述言語 (WSDL: Web Services Description Language) ドキュメント ファイルを作成する方法およびフォーマット方法を提供します。 このクラスは継承できません。

public ref class ServiceDescription sealed : System::Web::Services::Description::NamedItem
public ref class ServiceDescription sealed : System::Web::Services::Description::DocumentableItem
[System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")]
public sealed class ServiceDescription : System.Web.Services.Description.NamedItem
[System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")]
public sealed class ServiceDescription : System.Web.Services.Description.DocumentableItem
[<System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")>]
type ServiceDescription = class
    inherit NamedItem
[<System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")>]
type ServiceDescription = class
    inherit DocumentableItem
Public NotInheritable Class ServiceDescription
Inherits NamedItem
Public NotInheritable Class ServiceDescription
Inherits DocumentableItem
継承
ServiceDescription
継承
ServiceDescription
属性

ServiceDescription クラスのインスタンスを作成する方法の例を次に示します。

// Obtain the ServiceDescription of existing Wsdl.
ServiceDescription^ myDescription = ServiceDescription::Read( "MyWsdl_CS.wsdl" );

// Remove the Binding from the Binding Collection of ServiceDescription.
BindingCollection^ myBindingCollection = myDescription->Bindings;
myBindingCollection->Remove( myBindingCollection[ 0 ] );

// Form a new Binding.
Binding^ myBinding = gcnew Binding;
myBinding->Name = "Service1Soap";
XmlQualifiedName^ myXmlQualifiedName = gcnew XmlQualifiedName( "s0:Service1Soap" );
myBinding->Type = myXmlQualifiedName;
SoapBinding^ mySoapBinding = gcnew SoapBinding;
mySoapBinding->Transport = "http://schemas.xmlsoap.org/soap/http";
mySoapBinding->Style = SoapBindingStyle::Document;
OperationBinding^ addOperationBinding = CreateOperationBinding( "Add", myDescription->TargetNamespace );
myBinding->Operations->Add( addOperationBinding );
myBinding->Extensions->Add( mySoapBinding );

// Add the Binding to the ServiceDescription.
myDescription->Bindings->Add( myBinding );
myDescription->Write( "MyOutWsdl.wsdl" );
// Obtain the ServiceDescription of existing Wsdl.
ServiceDescription myDescription = ServiceDescription.Read("MyWsdl_CS.wsdl");
// Remove the Binding from the Binding Collection of ServiceDescription.
BindingCollection myBindingCollection = myDescription.Bindings;
myBindingCollection.Remove(myBindingCollection[0]);

// Form a new Binding.
Binding myBinding = new Binding();
myBinding.Name = "Service1Soap";
XmlQualifiedName myXmlQualifiedName =
                     new XmlQualifiedName("s0:Service1Soap");
myBinding.Type = myXmlQualifiedName;

SoapBinding mySoapBinding = new SoapBinding();
mySoapBinding.Transport = "http://schemas.xmlsoap.org/soap/http";
mySoapBinding.Style = SoapBindingStyle.Document;

OperationBinding addOperationBinding =
       CreateOperationBinding("Add",myDescription.TargetNamespace);
myBinding.Operations.Add(addOperationBinding);
myBinding.Extensions.Add(mySoapBinding);

// Add the Binding to the ServiceDescription.
myDescription.Bindings.Add(myBinding);
myDescription.Write("MyOutWsdl.wsdl");
' Obtain the ServiceDescription of existing Wsdl.
Dim myDescription As ServiceDescription = ServiceDescription.Read("MyWsdl_VB.wsdl")
' Remove the Binding from the Binding Collection of ServiceDescription.
Dim myBindingCollection As BindingCollection = myDescription.Bindings
myBindingCollection.Remove(myBindingCollection(0))

' Form a new Binding.
Dim myBinding As New Binding()
myBinding.Name = "Service1Soap"
Dim myXmlQualifiedName As New XmlQualifiedName("s0:Service1Soap")
myBinding.Type = myXmlQualifiedName

Dim mySoapBinding As New SoapBinding()
mySoapBinding.Transport = "http://schemas.xmlsoap.org/soap/http"
mySoapBinding.Style = SoapBindingStyle.Document

Dim addOperationBinding As OperationBinding = CreateOperationBinding("Add", _
                                             myDescription.TargetNamespace)
myBinding.Operations.Add(addOperationBinding)
myBinding.Extensions.Add(mySoapBinding)

' Add the Binding to the ServiceDescription.
myDescription.Bindings.Add(myBinding)
myDescription.Write("MyOutWsdl.wsdl")

注釈

このクラスのインスタンスは、 キーワードまたは静的Readメソッドをnew使用して作成できます。このメソッドは WSDL ファイルを解析し、その値をクラスの適切なメンバーに割り当てます。

WSDL は、XML Web サービスを記述するための XML ベースの言語です。 クラスは ServiceDescriptiondefinitionsWSDL ファイルのルート要素 である に対応します。 WSDL の詳細については、WSDL 仕様を参照してください。

コンストラクター

ServiceDescription()

ServiceDescription クラスの新しいインスタンスを初期化します。

フィールド

Namespace

クラスが定義されている ServiceDescription XML 名前空間 ("http://schemas.xmlsoap.org/wsdl/")。 このフィールドは定数です。

プロパティ

Bindings

Binding に格納されている ServiceDescription 要素のコレクションを取得します。

Documentation

DocumentableItem のインスタンスのテキスト ドキュメントを取得または設定します。

(継承元 DocumentableItem)
DocumentationElement

DocumentableItem のドキュメント要素を取得または設定します。

(継承元 DocumentableItem)
ExtensibleAttributes

Web Services Interoperability (WS-I) Basic Profile 1.1 に準拠する WSDL の属性の拡張機能を表す XmlAttribute 型の配列を取得または設定します。

(継承元 DocumentableItem)
Extensions

ServiceDescription に格納されている機能拡張要素のコレクションを取得します。

Imports

Import に格納されている ServiceDescription 要素のコレクションを取得します。

Messages

Message に格納されている ServiceDescription 要素のコレクションを取得します。

Name

Web サービス記述言語 (WSDL) ファイルを descriptions 囲むタグの XML 名属性を取得または設定します。

Name

項目の名前を取得または設定します。

(継承元 NamedItem)
Namespaces

ServiceDescription オブジェクトが生成されるときに名前空間プレフィックスと名前空間を保持するために使用する、名前空間プレフィックスと名前空間のディクショナリを取得または設定します。

(継承元 DocumentableItem)
PortTypes

PortType に格納されている ServiceDescription 要素のコレクションを取得します。

RetrievalUrl

ServiceDescription インスタンスが適用される XML Web サービスの URL を取得または設定します。

Schema

この ServiceDescription に関連付けられているスキーマを取得します。

Serializer

ServiceDescription オブジェクトと Web サービス記述言語 (WSDL: Web Services Description Language) ドキュメント間のシリアル化および逆シリアル化に使用される XML シリアライザーを取得します。

ServiceDescriptions

ServiceDescriptionCollection がメンバーとして含まれている ServiceDescription インスタンスを取得します。

Services

Service に格納されている ServiceDescription インスタンスのコレクションを取得します。

TargetNamespace

Web サービス記述言語 (WSDL :Web Services Description Language) ファイルを囲む targetNamespace タグの XML descriptions 属性を取得または設定します。

Types

Types に格納された ServiceDescription を取得または設定します。

ValidationWarnings

StringCollectionRead(Stream, Boolean)Read(TextReader, Boolean)、または Read(String, Boolean) を、true に設定した validate パラメーターを指定して呼び出したときに生成された検証の警告を格納する Read(XmlReader, Boolean) を取得します。

メソッド

CanRead(XmlReader)

XmlReader が、解析できる有効な Web サービス記述言語 (WSDL: Web Services Description Language) ファイルを表すかどうかを示す値を取得します。

Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
Read(Stream)

ServiceDescription インスタンスから XML を直接読み込んで Stream クラスのインスタンスを初期化します。

Read(Stream, Boolean)

ServiceDescription インスタンスから XML を直接読み込んで Stream クラスのインスタンスを初期化します。

Read(String)

指定したファイルから XML を直接読み込んで ServiceDescription オブジェクトのインスタンスを初期化します。

Read(String, Boolean)

指定したファイルから XML を直接読み込んで ServiceDescription オブジェクトのインスタンスを初期化します。

Read(TextReader)

ServiceDescription から XML を直接読み込んで TextReader クラスのインスタンスを初期化します。

Read(TextReader, Boolean)

ServiceDescription から XML を直接読み込んで TextReader クラスのインスタンスを初期化します。

Read(XmlReader)

ServiceDescription から XML を直接読み込んで XmlReader クラスのインスタンスを初期化します。

Read(XmlReader, Boolean)

ServiceDescription から XML を直接読み込んで XmlReader クラスのインスタンスを初期化します。

ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)
Write(Stream)

ServiceDescription を指定した Stream に書き込みます。

Write(String)

ServiceDescription を Web サービス記述言語 (WSDL) ファイルとして指定したパスに書き込みます。

Write(TextWriter)

ServiceDescription を、Web サービス記述言語 (WSDL) ファイルとして TextWriter に書き込みます。

Write(XmlWriter)

ServiceDescription を、Web サービス記述言語 (WSDL) ファイルとして XmlWriter に書き込みます。

適用対象