OperationInput クラス
アセンブリ: System.Web.Services (system.web.services.dll 内)


このクラスの 1 つのインスタンスだけが、親 Operation インスタンスの Messages プロパティのメンバになります。
OperationInput クラスは、operation 要素で囲まれた WSDL (Web Services Description Language) input 要素に対応します。さらに、この要素は portType 要素で囲まれます。WSDL の詳細については、http://www.w3.org/TR/wsdl/ の仕様を参照してください。

Imports System Imports System.Web.Services.Description Imports System.Collections Imports System.Xml Class MyOperationInputSample Public Shared Sub Main() Try Dim myDescription As ServiceDescription = _ ServiceDescription.Read("AddNumbersIn_vb.wsdl") ' Add the ServiceHttpPost binding. Dim myBinding As New Binding() myBinding.Name = "ServiceHttpPost" Dim myXmlQualifiedName As New XmlQualifiedName("s0:ServiceHttpPost") myBinding.Type = myXmlQualifiedName Dim myHttpBinding As New HttpBinding() myHttpBinding.Verb = "POST" myBinding.Extensions.Add(myHttpBinding) ' Add the operation name AddNumbers. Dim myOperationBinding As New OperationBinding() myOperationBinding.Name = "AddNumbers" Dim myOperation As New HttpOperationBinding() myOperation.Location = "/AddNumbers" myOperationBinding.Extensions.Add(myOperation) ' Add the input binding. Dim myInput As New InputBinding() Dim postMimeContentbinding As New MimeContentBinding() postMimeContentbinding.Type = "application/x-www-form-urlencoded" myInput.Extensions.Add(postMimeContentbinding) ' Add the InputBinding to the OperationBinding. myOperationBinding.Input = myInput ' Add the ouput binding. Dim myOutput As New OutputBinding() Dim postMimeXmlBinding As New MimeXmlBinding() postMimeXmlBinding.Part = "Body" myOutput.Extensions.Add(postMimeXmlBinding) ' Add the OutputBinding to the OperationBinding. myOperationBinding.Output = myOutput myBinding.Operations.Add(myOperationBinding) myDescription.Bindings.Add(myBinding) ' Add the port definition. Dim postPort As New Port() postPort.Name = "ServiceHttpPost" postPort.Binding = New XmlQualifiedName("s0:ServiceHttpPost") Dim postAddressBinding As New HttpAddressBinding() postAddressBinding.Location = "http://localhost/Service.vb.asmx" postPort.Extensions.Add(postAddressBinding) myDescription.Services(0).Ports.Add(postPort) ' Add the post port type definition. Dim postPortType As New PortType() postPortType.Name = "ServiceHttpPost" Dim postOperation As New Operation() postOperation.Name = "AddNumbers" Dim postOutput As OperationMessage = _ CType(New OperationOutput(), OperationMessage) postOutput.Message = New XmlQualifiedName("s0:AddNumbersHttpPostOut") Dim postInput As New OperationInput() postInput.Message = New XmlQualifiedName("s0:AddNumbersHttpPostIn") postOperation.Messages.Add(postInput) postOperation.Messages.Add(postOutput) postPortType.Operations.Add(postOperation) myDescription.PortTypes.Add(postPortType) ' Add the first message information. Dim postMessage1 As New Message() postMessage1.Name = "AddNumbersHttpPostIn" Dim postMessagePart1 As New MessagePart() postMessagePart1.Name = "firstnumber" postMessagePart1.Type = New XmlQualifiedName("s:string") ' Add the second message information. Dim postMessagePart2 As New MessagePart() postMessagePart2.Name = "secondnumber" postMessagePart2.Type = New XmlQualifiedName("s:string") postMessage1.Parts.Add(postMessagePart1) postMessage1.Parts.Add(postMessagePart2) Dim postMessage2 As New Message() postMessage2.Name = "AddNumbersHttpPostOut" ' Add the third message information. Dim postMessagePart3 As New MessagePart() postMessagePart3.Name = "Body" postMessagePart3.Element = New XmlQualifiedName("s0:int") postMessage2.Parts.Add(postMessagePart3) myDescription.Messages.Add(postMessage1) myDescription.Messages.Add(postMessage2) ' Write the ServiceDescription as a WSDL file. myDescription.Write("AddNumbersOut_vb.wsdl") Console.WriteLine("WSDL file named AddNumberOut_vb.Wsdl" & _ " created successfully.") Catch e As Exception Console.WriteLine("Exception caught!!!") Console.WriteLine("Source : " & e.Source) Console.WriteLine("Message : " & e.Message) End Try End Sub End Class
using System; using System.Web.Services.Description; using System.Collections; using System.Xml; class MyOperationInputSample { public static void Main() { try { ServiceDescription myDescription = ServiceDescription.Read("AddNumbersIn_cs.wsdl"); // Add the ServiceHttpPost binding. Binding myBinding = new Binding(); myBinding.Name = "ServiceHttpPost"; XmlQualifiedName myXmlQualifiedName = new XmlQualifiedName ("s0:ServiceHttpPost"); myBinding.Type = myXmlQualifiedName; HttpBinding myHttpBinding = new HttpBinding(); myHttpBinding.Verb = "POST"; myBinding.Extensions.Add(myHttpBinding); // Add the operation name AddNumbers. OperationBinding myOperationBinding = new OperationBinding(); myOperationBinding.Name = "AddNumbers"; HttpOperationBinding myOperation = new HttpOperationBinding(); myOperation.Location = "/AddNumbers"; myOperationBinding.Extensions.Add(myOperation); // Add the input binding. InputBinding myInput = new InputBinding(); MimeContentBinding postMimeContentbinding = new MimeContentBinding(); postMimeContentbinding.Type= "application/x-www-form-urlencoded"; myInput.Extensions.Add(postMimeContentbinding); // Add the InputBinding to the OperationBinding. myOperationBinding.Input = myInput; // Add the ouput binding. OutputBinding myOutput = new OutputBinding(); MimeXmlBinding postMimeXmlBinding = new MimeXmlBinding(); postMimeXmlBinding.Part= "Body"; myOutput.Extensions.Add(postMimeXmlBinding); // Add the OutputBinding to the OperationBinding. myOperationBinding.Output = myOutput; myBinding.Operations.Add(myOperationBinding); myDescription.Bindings.Add(myBinding); // Add the port definition. Port postPort = new Port(); postPort.Name = "ServiceHttpPost"; postPort.Binding = new XmlQualifiedName("s0:ServiceHttpPost"); HttpAddressBinding postAddressBinding = new HttpAddressBinding(); postAddressBinding.Location = "http://localhost/Service.cs.asmx"; postPort.Extensions.Add(postAddressBinding); myDescription.Services[0].Ports.Add(postPort); // Add the post port type definition. PortType postPortType = new PortType(); postPortType.Name = "ServiceHttpPost"; Operation postOperation = new Operation(); postOperation.Name = "AddNumbers"; OperationMessage postOutput = (OperationMessage)new OperationOutput(); postOutput.Message = new XmlQualifiedName ("s0:AddNumbersHttpPostOut"); OperationInput postInput = new OperationInput(); postInput.Message = new XmlQualifiedName ("s0:AddNumbersHttpPostIn"); postOperation.Messages.Add(postInput); postOperation.Messages.Add(postOutput); postPortType.Operations.Add(postOperation); myDescription.PortTypes.Add(postPortType); // Add the first message information. Message postMessage1 = new Message(); postMessage1.Name="AddNumbersHttpPostIn"; MessagePart postMessagePart1 = new MessagePart(); postMessagePart1.Name = "firstnumber"; postMessagePart1.Type = new XmlQualifiedName("s:string"); // Add the second message information. MessagePart postMessagePart2 = new MessagePart(); postMessagePart2.Name = "secondnumber"; postMessagePart2.Type = new XmlQualifiedName("s:string"); postMessage1.Parts.Add(postMessagePart1); postMessage1.Parts.Add(postMessagePart2); Message postMessage2 = new Message(); postMessage2.Name = "AddNumbersHttpPostOut"; // Add the third message information. MessagePart postMessagePart3 = new MessagePart(); postMessagePart3.Name = "Body"; postMessagePart3.Element = new XmlQualifiedName("s0:int"); postMessage2.Parts.Add(postMessagePart3); myDescription.Messages.Add(postMessage1); myDescription.Messages.Add(postMessage2); // Write the ServiceDescription as a WSDL file. myDescription.Write("AddNumbersOut_cs.wsdl"); Console.WriteLine("WSDL file named AddNumberOut_cs.Wsdl" + " created successfully."); } catch(Exception e) { Console.WriteLine("Exception caught!!!"); Console.WriteLine("Source : " + e.Source); Console.WriteLine("Message : " + e.Message); } } }
#using <System.Xml.dll> #using <System.Web.Services.dll> #using <System.dll> using namespace System; using namespace System::Web::Services::Description; using namespace System::Collections; using namespace System::Xml; int main() { try { ServiceDescription^ myDescription = ServiceDescription::Read( "AddNumbersIn_cs.wsdl" ); // Add the ServiceHttpPost binding. Binding^ myBinding = gcnew Binding; myBinding->Name = "ServiceHttpPost"; XmlQualifiedName^ myXmlQualifiedName = gcnew XmlQualifiedName( "s0:ServiceHttpPost" ); myBinding->Type = myXmlQualifiedName; HttpBinding^ myHttpBinding = gcnew HttpBinding; myHttpBinding->Verb = "POST"; myBinding->Extensions->Add( myHttpBinding ); // Add the operation name AddNumbers. OperationBinding^ myOperationBinding = gcnew OperationBinding; myOperationBinding->Name = "AddNumbers"; HttpOperationBinding^ myOperation = gcnew HttpOperationBinding; myOperation->Location = "/AddNumbers"; myOperationBinding->Extensions->Add( myOperation ); // Add the input binding. InputBinding^ myInput = gcnew InputBinding; MimeContentBinding^ postMimeContentbinding = gcnew MimeContentBinding; postMimeContentbinding->Type = "application/x-www-form-urlencoded"; myInput->Extensions->Add( postMimeContentbinding ); // Add the InputBinding to the OperationBinding. myOperationBinding->Input = myInput; // Add the ouput binding. OutputBinding^ myOutput = gcnew OutputBinding; MimeXmlBinding^ postMimeXmlBinding = gcnew MimeXmlBinding; postMimeXmlBinding->Part = "Body"; myOutput->Extensions->Add( postMimeXmlBinding ); // Add the OutputBinding to the OperationBinding. myOperationBinding->Output = myOutput; myBinding->Operations->Add( myOperationBinding ); myDescription->Bindings->Add( myBinding ); // Add the port definition. Port^ postPort = gcnew Port; postPort->Name = "ServiceHttpPost"; postPort->Binding = gcnew XmlQualifiedName( "s0:ServiceHttpPost" ); HttpAddressBinding^ postAddressBinding = gcnew HttpAddressBinding; postAddressBinding->Location = "http://localhost/Service.cs.asmx"; postPort->Extensions->Add( postAddressBinding ); myDescription->Services[ 0 ]->Ports->Add( postPort ); // Add the post port type definition. PortType^ postPortType = gcnew PortType; postPortType->Name = "ServiceHttpPost"; Operation^ postOperation = gcnew Operation; postOperation->Name = "AddNumbers"; OperationMessage^ postOutput = dynamic_cast<OperationMessage^>(gcnew OperationOutput); postOutput->Message = gcnew XmlQualifiedName( "s0:AddNumbersHttpPostOut" ); OperationInput^ postInput = gcnew OperationInput; postInput->Message = gcnew XmlQualifiedName( "s0:AddNumbersHttpPostIn" ); postOperation->Messages->Add( postInput ); postOperation->Messages->Add( postOutput ); postPortType->Operations->Add( postOperation ); myDescription->PortTypes->Add( postPortType ); // Add the first message information. Message^ postMessage1 = gcnew Message; postMessage1->Name = "AddNumbersHttpPostIn"; MessagePart^ postMessagePart1 = gcnew MessagePart; postMessagePart1->Name = "firstnumber"; postMessagePart1->Type = gcnew XmlQualifiedName( "s:string" ); // Add the second message information. MessagePart^ postMessagePart2 = gcnew MessagePart; postMessagePart2->Name = "secondnumber"; postMessagePart2->Type = gcnew XmlQualifiedName( "s:string" ); postMessage1->Parts->Add( postMessagePart1 ); postMessage1->Parts->Add( postMessagePart2 ); Message^ postMessage2 = gcnew Message; postMessage2->Name = "AddNumbersHttpPostOut"; // Add the third message information. MessagePart^ postMessagePart3 = gcnew MessagePart; postMessagePart3->Name = "Body"; postMessagePart3->Element = gcnew XmlQualifiedName( "s0:int" ); postMessage2->Parts->Add( postMessagePart3 ); myDescription->Messages->Add( postMessage1 ); myDescription->Messages->Add( postMessage2 ); // Write the ServiceDescription as a WSDL file. myDescription->Write( "AddNumbersOut_cs.wsdl" ); Console::WriteLine( "WSDL file named AddNumberOut_cs.Wsdl" " created successfully." ); } catch ( Exception^ e ) { Console::WriteLine( "Exception caught!!!" ); Console::WriteLine( "Source : {0}", e->Source ); Console::WriteLine( "Message : {0}", e->Message ); } }
import System.*; import System.Web.Services.Description.*; import System.Collections.*; import System.Xml.*; class MyOperationInputSample { public static void main(String[] args) { try { ServiceDescription myDescription = ServiceDescription. Read("AddNumbersIn_jsl.wsdl"); // Add the ServiceHttpPost binding. Binding myBinding = new Binding(); myBinding.set_Name("ServiceHttpPost"); XmlQualifiedName myXmlQualifiedName = new XmlQualifiedName( "s0:ServiceHttpPost"); myBinding.set_Type(myXmlQualifiedName); HttpBinding myHttpBinding = new HttpBinding(); myHttpBinding.set_Verb("POST"); myBinding.get_Extensions().Add(myHttpBinding); // Add the operation name AddNumbers. OperationBinding myOperationBinding = new OperationBinding(); myOperationBinding.set_Name("AddNumbers"); HttpOperationBinding myOperation = new HttpOperationBinding(); myOperation.set_Location("/AddNumbers"); myOperationBinding.get_Extensions().Add(myOperation); // Add the input binding. InputBinding myInput = new InputBinding(); MimeContentBinding postMimeContentBinding = new MimeContentBinding(); postMimeContentBinding. set_Type("application/x-www-form-urlencoded"); myInput.get_Extensions().Add(postMimeContentBinding); // Add the InputBinding to the OperationBinding. myOperationBinding.set_Input(myInput); // Add the ouput binding. OutputBinding myOutput = new OutputBinding(); MimeXmlBinding postMimeXmlBinding = new MimeXmlBinding(); postMimeXmlBinding.set_Part("Body"); myOutput.get_Extensions().Add(postMimeXmlBinding); // Add the OutputBinding to the OperationBinding. myOperationBinding.set_Output(myOutput); myBinding.get_Operations().Add(myOperationBinding); myDescription.get_Bindings().Add(myBinding); // Add the port definition. Port postPort = new Port(); postPort.set_Name("ServiceHttpPost"); postPort.set_Binding(new XmlQualifiedName("s0:ServiceHttpPost")); HttpAddressBinding postAddressBinding = new HttpAddressBinding(); postAddressBinding. set_Location("http://localhost/Service.jsl.asmx"); postPort.get_Extensions().Add(postAddressBinding); myDescription.get_Services().get_Item(0).get_Ports().Add(postPort); // Add the post port type definition. PortType postPortType = new PortType(); postPortType.set_Name("ServiceHttpPost"); Operation postOperation = new Operation(); postOperation.set_Name("AddNumbers"); OperationMessage postOutput = (OperationMessage) new OperationOutput(); postOutput.set_Message(new XmlQualifiedName( "s0:AddNumbersHttpPostOut")); OperationInput postInput = new OperationInput(); postInput.set_Message(new XmlQualifiedName( "s0:AddNumbersHttpPostIn")); postOperation.get_Messages().Add(postInput); postOperation.get_Messages().Add(postOutput); postPortType.get_Operations().Add(postOperation); myDescription.get_PortTypes().Add(postPortType); // Add the first message information. Message postMessage1 = new Message(); postMessage1.set_Name("AddNumbersHttpPostIn"); MessagePart postMessagePart1 = new MessagePart(); postMessagePart1.set_Name("firstnumber"); postMessagePart1.set_Type(new XmlQualifiedName("s:string")); // Add the second message information. MessagePart postMessagePart2 = new MessagePart(); postMessagePart2.set_Name("secondnumber"); postMessagePart2.set_Type(new XmlQualifiedName("s:string")); postMessage1.get_Parts().Add(postMessagePart1); postMessage1.get_Parts().Add(postMessagePart2); Message postMessage2 = new Message(); postMessage2.set_Name("AddNumbersHttpPostOut"); // Add the third message information. MessagePart postMessagePart3 = new MessagePart(); postMessagePart3.set_Name("Body"); postMessagePart3.set_Element(new XmlQualifiedName("s0:int")); postMessage2.get_Parts().Add(postMessagePart3); myDescription.get_Messages().Add(postMessage1); myDescription.get_Messages().Add(postMessage2); // Write the ServiceDescription as a WSDL file. myDescription.Write("AddNumbersOut_jsl.wsdl"); Console.WriteLine("WSDL file named AddNumberOut_jsl.Wsdl" + " created successfully."); } catch (System.Exception e) { Console.WriteLine("Exception caught!!!"); Console.WriteLine("Source : " + e.get_Source()); Console.WriteLine("Message : " + e.get_Message()); } } //main } //MyOperationInputSample

System.Web.Services.Description.DocumentableItem
System.Web.Services.Description.NamedItem
System.Web.Services.Description.OperationMessage
System.Web.Services.Description.OperationInput


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


OperationInput コンストラクタ
アセンブリ: System.Web.Services (system.web.services.dll 内)


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


OperationInput プロパティ

名前 | 説明 | |
---|---|---|
![]() | Documentation | DocumentableItem のインスタンスのテキスト ドキュメントを取得または設定します。 ( DocumentableItem から継承されます。) |
![]() | DocumentationElement | DocumentableItem のドキュメント要素を取得または設定します。 ( DocumentableItem から継承されます。) |
![]() | ExtensibleAttributes | Web Services Interoperability (WS-I) Basic Profile 1.1 に準拠する WSDL の属性の拡張機能を表す XmlAttribute 型の配列を取得または設定します。 ( DocumentableItem から継承されます。) |
![]() | Extensions | オーバーライドされます。 この OperationInput に関連付けられている ServiceDescriptionFormatExtensionCollection を取得します。 |
![]() | Message | 通信データの抽象的な型定義を取得または設定します。 ( OperationMessage から継承されます。) |
![]() | Name | 項目の名前を取得または設定します。 ( NamedItem から継承されます。) |
![]() | Namespaces | ServiceDescription オブジェクトが生成されるときに名前空間プレフィックスと名前空間を保持するために使用する、名前空間プレフィックスと名前空間のディクショナリを取得または設定します。 ( DocumentableItem から継承されます。) |
![]() | Operation | OperationMessage がメンバとして含まれている Operation を取得します。 ( OperationMessage から継承されます。) |

OperationInput メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 ( Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 ( Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

OperationInput メンバ
XML Web サービスで受信する入力メッセージの仕様を定義します。このクラスは継承できません。
OperationInput データ型で公開されるメンバを以下の表に示します。

名前 | 説明 | |
---|---|---|
![]() | OperationInput |

名前 | 説明 | |
---|---|---|
![]() | Documentation | DocumentableItem のインスタンスのテキスト ドキュメントを取得または設定します。(DocumentableItem から継承されます。) |
![]() | DocumentationElement | DocumentableItem のドキュメント要素を取得または設定します。(DocumentableItem から継承されます。) |
![]() | ExtensibleAttributes | Web Services Interoperability (WS-I) Basic Profile 1.1 に準拠する WSDL の属性の拡張機能を表す XmlAttribute 型の配列を取得または設定します。(DocumentableItem から継承されます。) |
![]() | Extensions | オーバーライドされます。 この OperationInput に関連付けられている ServiceDescriptionFormatExtensionCollection を取得します。 |
![]() | Message | 通信データの抽象的な型定義を取得または設定します。(OperationMessage から継承されます。) |
![]() | Name | 項目の名前を取得または設定します。(NamedItem から継承されます。) |
![]() | Namespaces | ServiceDescription オブジェクトが生成されるときに名前空間プレフィックスと名前空間を保持するために使用する、名前空間プレフィックスと名前空間のディクショナリを取得または設定します。(DocumentableItem から継承されます。) |
![]() | Operation | OperationMessage がメンバとして含まれている Operation を取得します。(OperationMessage から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 2 つの Object インスタンスが等しいかどうかを判断します。 (Object から継承されます。) |
![]() | GetHashCode | 特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用に適しています。 (Object から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

- OperationInputのページへのリンク