ServiceDescription クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
XML Web サービスを記述するための適切な名前空間、要素、属性を含む有効な Web サービス記述言語 (WSDL) ドキュメント ファイルを作成および書式設定する手段を提供します。 このクラスは継承できません。
public ref class ServiceDescription sealed : System::Web::Services::Description::DocumentableItem
public ref class ServiceDescription sealed : 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")]
public sealed class ServiceDescription : System.Web.Services.Description.NamedItem
[<System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")>]
type ServiceDescription = class
inherit DocumentableItem
[<System.Web.Services.Configuration.XmlFormatExtensionPoint("Extensions")>]
type ServiceDescription = class
inherit NamedItem
Public NotInheritable Class ServiceDescription
Inherits DocumentableItem
Public NotInheritable Class ServiceDescription
Inherits NamedItem
- 継承
- 継承
- 属性
例
次の例は、 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")
注釈
このクラスのインスタンスは、wsdL ファイルを解析し、その値をクラスの適切なメンバーに割り当てる、 new キーワードまたは静的 Read メソッドを使用して作成できます。
WSDL は、XML Web サービスを記述するための XML ベースの言語です。
ServiceDescription クラスは、WSDL ファイルのルート要素 (definitions) に対応します。 WSDL の詳細については、 WSDL 仕様を参照してください。
コンストラクター
| 名前 | 説明 |
|---|---|
| ServiceDescription() |
ServiceDescription クラスの新しいインスタンスを初期化します。 |
フィールド
| 名前 | 説明 |
|---|---|
| Namespace |
ServiceDescription クラスが定義されている XML 名前空間 ("http://schemas.xmlsoap.org/wsdl/")。 このフィールドは定数です。 |
プロパティ
| 名前 | 説明 |
|---|---|
| Bindings |
Bindingに含まれるServiceDescription要素のコレクションを取得します。 |
| Documentation |
DocumentableItemのインスタンスのテキスト ドキュメントを取得または設定します。 (継承元 DocumentableItem) |
| DocumentationElement |
DocumentableItemのドキュメント要素を取得または設定します。 (継承元 DocumentableItem) |
| ExtensibleAttributes |
Web サービス相互運用性 (WS-I) Basic Profile 1.1 に準拠する WSDL の属性拡張を表す XmlAttribute 型の配列を取得または設定します。 (継承元 DocumentableItem) |
| Extensions |
ServiceDescriptionに含まれる機能拡張要素のコレクションを取得します。 |
| Imports |
Importに含まれるServiceDescription要素のコレクションを取得します。 |
| Messages |
Messageに含まれるServiceDescription要素のコレクションを取得します。 |
| Name |
Web サービス記述言語 (WSDL) ファイルを囲む |
| Name |
項目の名前を取得または設定します。 (継承元 NamedItem) |
| Namespaces |
ServiceDescription オブジェクトの作成時に名前空間プレフィックスと名前空間を保持するために使用される名前空間プレフィックスと名前空間のディクショナリを取得または設定します。 (継承元 DocumentableItem) |
| PortTypes |
PortTypeに含まれるServiceDescription要素のコレクションを取得します。 |
| RetrievalUrl |
ServiceDescription インスタンスが適用される XML Web サービスの URL を取得または設定します。 |
| Schema |
この ServiceDescriptionに関連付けられているスキーマを取得します。 |
| Serializer |
ServiceDescription オブジェクトと Web サービス記述言語 (WSDL) ドキュメントの間でシリアル化および逆シリアル化するために使用される XML シリアライザーを取得します。 |
| ServiceDescriptions |
ServiceDescriptionCollectionがメンバーであるServiceDescription インスタンスを取得します。 |
| Services |
Serviceに含まれるServiceDescriptionインスタンスのコレクションを取得します。 |
| TargetNamespace |
Web サービス記述言語 (WSDL) ファイルを囲む |
| Types |
Typesに含まれるServiceDescriptionを取得または設定します。 |
| ValidationWarnings |
StringCollection パラメーターをRead(Stream, Boolean)に設定して、Read(TextReader, Boolean)、Read(String, Boolean)、Read(XmlReader, Boolean)、または |
メソッド
| 名前 | 説明 |
|---|---|
| CanRead(XmlReader) |
XmlReaderが解析可能な有効な Web サービス記述言語 (WSDL) ファイルを表すかどうかを示す値を取得します。 |
| Equals(Object) |
指定したオブジェクトが現在のオブジェクトと等しいかどうかを判断します。 (継承元 Object) |
| GetHashCode() |
既定のハッシュ関数として機能します。 (継承元 Object) |
| GetType() |
現在のインスタンスの Type を取得します。 (継承元 Object) |
| MemberwiseClone() |
現在の Objectの簡易コピーを作成します。 (継承元 Object) |
| Read(Stream, Boolean) |
ServiceDescription インスタンスから XML を直接読み込んで、Stream クラスのインスタンスを初期化します。 |
| Read(Stream) |
ServiceDescription インスタンスから XML を直接読み込んで、Stream クラスのインスタンスを初期化します。 |
| Read(String, Boolean) |
指定したファイルから XML を直接読み込んで、 ServiceDescription オブジェクトのインスタンスを初期化します。 |
| Read(String) |
指定したファイルから XML を直接読み込んで、 ServiceDescription オブジェクトのインスタンスを初期化します。 |
| Read(TextReader, Boolean) |
ServiceDescriptionから XML を直接読み込んで、TextReader クラスのインスタンスを初期化します。 |
| Read(TextReader) |
ServiceDescriptionから XML を直接読み込んで、TextReader クラスのインスタンスを初期化します。 |
| Read(XmlReader, Boolean) |
ServiceDescriptionから XML を直接読み込んで、XmlReader クラスのインスタンスを初期化します。 |
| Read(XmlReader) |
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に書き出します。 |