SoapOperationBindingとは? わかりやすく解説

SoapOperationBinding クラス

XML Web サービス内の OperationBinding に追加され拡張機能表します

名前空間: System.Web.Services.Description
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文構文

Public Class SoapOperationBinding
    Inherits ServiceDescriptionFormatExtension
Dim instance As SoapOperationBinding
public class SoapOperationBinding : ServiceDescriptionFormatExtension
public ref class SoapOperationBinding : public
 ServiceDescriptionFormatExtension
public class SoapOperationBinding extends ServiceDescriptionFormatExtension
public class SoapOperationBinding extends
 ServiceDescriptionFormatExtension
解説解説
使用例使用例
Imports System
Imports System.Web.Services.Description
Imports System.Collections
Imports System.Xml

Class MySoapClass
   Public Shared Sub Main()
      Dim myDescription As ServiceDescription
 = _
                     ServiceDescription.Read("AddNumbersInput_vb.wsdl")
      ' Create a 'Binding' object for the 'SOAP' protocol.
      Dim myBinding As New
 Binding()
      myBinding.Name = "Service1Soap"
      Dim qualifiedName As New
 XmlQualifiedName("s0:Service1Soap")
      myBinding.Type = qualifiedName

      Dim mySoapBinding As New
 SoapBinding()
      mySoapBinding.Transport = SoapBinding.HttpTransport
      mySoapBinding.Style = SoapBindingStyle.Document

      ' Add the 'SoapBinding' object to the 'Binding' object.
      myBinding.Extensions.Add(mySoapBinding)

      ' Create the 'OperationBinding' object for the 'SOAP' protocol.
      Dim myOperationBinding As New
 OperationBinding()
      myOperationBinding.Name = "AddNumbers"

      ' Create the 'SoapOperationBinding' object for the 'SOAP' protocol.
      Dim mySoapOperationBinding As New
 SoapOperationBinding()
      mySoapOperationBinding.SoapAction = "http://tempuri.org/AddNumbers"
      mySoapOperationBinding.Style = SoapBindingStyle.Document
      ' Add the 'SoapOperationBinding' object to 'OperationBinding'
 object.
      myOperationBinding.Extensions.Add(mySoapOperationBinding)

      ' Create the 'InputBinding' object for the 'SOAP' protocol.
      Dim myInput As New
 InputBinding()
      Dim mySoapBinding1 As New
 SoapBodyBinding()
      mySoapBinding1.Use = SoapBindingUse.Literal
      myInput.Extensions.Add(mySoapBinding1)
      ' Assign the 'InputBinding' to 'OperationBinding'.
      myOperationBinding.Input = myInput
      ' Create the 'OutputBinding' object' for the 'SOAP' protocol.
      Dim myOutput As New
 OutputBinding()
      myOutput.Extensions.Add(mySoapBinding1)
      ' Assign the 'OutPutBinding' to 'OperationBinding'.
      myOperationBinding.Output = myOutput

      ' Add the 'OperationBinding' to 'Binding'.
      myBinding.Operations.Add(myOperationBinding)

      ' Add the 'Binding' to 'BindingCollection' of 'ServiceDescription'.
      myDescription.Bindings.Add(myBinding)

      Dim soapPort As New
 Port()
      soapPort.Name = "Service1Soap"
      soapPort.Binding = New XmlQualifiedName("s0:Service1Soap")

      ' Create a 'SoapAddressBinding' object for the 'SOAP' protocol.
      Dim mySoapAddressBinding As New
 SoapAddressBinding()
      mySoapAddressBinding.Location = "http://localhost/AddNumbers.vb.asmx"

      ' Add the 'SoapAddressBinding' to the 'Port'.
      soapPort.Extensions.Add(mySoapAddressBinding)

      ' Add the 'Port' to 'PortCollection' of 'ServiceDescription'.
      myDescription.Services(0).Ports.Add(soapPort)

      ' Write the 'ServiceDescription' as a WSDL file.
      myDescription.Write("AddNumbersOut_vb.wsdl")
      Console.WriteLine(" 'AddNumbersOut_vb.Wsdl' file was generated")
   End Sub 'Main
End Class 'MySoapClass
using System;
using System.Web.Services.Description;
using System.Collections;
using System.Xml;

   class MySoapClass
   {
      public static void
 Main()
      {
         ServiceDescription myDescription =
                     ServiceDescription.Read("AddNumbersInput_cs.wsdl");
         // Create a 'Binding' object for the 'SOAP' protocol.
         Binding myBinding = new Binding();
         myBinding.Name = "Service1Soap";
         XmlQualifiedName qualifiedName =
                     new XmlQualifiedName("s0:Service1Soap");
         myBinding.Type = qualifiedName;

         SoapBinding mySoapBinding = new SoapBinding();
         mySoapBinding.Transport = SoapBinding.HttpTransport;
         mySoapBinding.Style = SoapBindingStyle.Document;
         // Add the 'SoapBinding' object to the 'Binding' object.
         myBinding.Extensions.Add(mySoapBinding);

         // Create the 'OperationBinding' object for the 'SOAP' protocol.
         OperationBinding myOperationBinding = new OperationBinding();
         myOperationBinding.Name = "AddNumbers";

         // Create the 'SoapOperationBinding' object for the 'SOAP'
 protocol.
         SoapOperationBinding mySoapOperationBinding =
                                          new SoapOperationBinding();
         mySoapOperationBinding.SoapAction  = "http://tempuri.org/AddNumbers";
         mySoapOperationBinding.Style = SoapBindingStyle.Document;
         // Add the 'SoapOperationBinding' object to 'OperationBinding'
 object.
         myOperationBinding.Extensions.Add(mySoapOperationBinding);

         // Create the 'InputBinding' object for the 'SOAP' protocol.
         InputBinding myInput = new InputBinding();
         SoapBodyBinding mySoapBinding1 = new SoapBodyBinding();
         mySoapBinding1.Use= SoapBindingUse.Literal;
         myInput.Extensions.Add(mySoapBinding1);
         // Assign the 'InputBinding' to 'OperationBinding'.
         myOperationBinding.Input = myInput;
         // Create the 'OutputBinding' object' for the 'SOAP' protocol..
         OutputBinding myOutput = new OutputBinding();
         myOutput.Extensions.Add(mySoapBinding1);
          // Assign the 'OutPutBinding' to 'OperationBinding'.
         myOperationBinding.Output = myOutput; 

         // Add the 'OperationBinding' to 'Binding'.
         myBinding.Operations.Add(myOperationBinding);

          // Add the 'Binding' to 'BindingCollection' of 'ServiceDescription'.
         myDescription.Bindings.Add(myBinding);

         Port soapPort = new Port();
         soapPort.Name = "Service1Soap";
         soapPort.Binding = new XmlQualifiedName("s0:Service1Soap");

         // Create a 'SoapAddressBinding' object for the 'SOAP' protocol.
         SoapAddressBinding mySoapAddressBinding = 
                                       new SoapAddressBinding();
         mySoapAddressBinding.Location = "http://localhost/AddNumbers.cs.asmx";

         // Add the 'SoapAddressBinding' to the 'Port'.
         soapPort.Extensions.Add(mySoapAddressBinding);

         // Add the 'Port' to 'PortCollection' of 'ServiceDescription'.
         myDescription.Services[0].Ports.Add(soapPort);

         // Write the 'ServiceDescription' as a WSDL file.
         myDescription.Write("AddNumbersOut_cs.wsdl");
         Console.WriteLine(" 'AddNumbersOut_cs.Wsdl' file was generated");
    }
}
#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()
{
   ServiceDescription^ myDescription = ServiceDescription::Read( "AddNumbersInput_cs.wsdl"
 );

   // Create a 'Binding' object for the 'SOAP' protocol.
   Binding^ myBinding = gcnew Binding;
   myBinding->Name = "Service1Soap";
   XmlQualifiedName^ qualifiedName = gcnew XmlQualifiedName( "s0:Service1Soap"
 );
   myBinding->Type = qualifiedName;

   SoapBinding^ mySoapBinding = gcnew SoapBinding;
   mySoapBinding->Transport = SoapBinding::HttpTransport;
   mySoapBinding->Style = SoapBindingStyle::Document;

   // Add the 'SoapBinding' object to the 'Binding' object.
   myBinding->Extensions->Add( mySoapBinding );

   // Create the 'OperationBinding' object for the 'SOAP' protocol.
   OperationBinding^ myOperationBinding = gcnew OperationBinding;
   myOperationBinding->Name = "AddNumbers";

   // Create the 'SoapOperationBinding' object for the 'SOAP' protocol.
   SoapOperationBinding^ mySoapOperationBinding = gcnew SoapOperationBinding;
   mySoapOperationBinding->SoapAction = "http://tempuri.org/AddNumbers";
   mySoapOperationBinding->Style = SoapBindingStyle::Document;

   // Add the 'SoapOperationBinding' object to 'OperationBinding' object.
   myOperationBinding->Extensions->Add( mySoapOperationBinding );

   // Create the 'InputBinding' object for the 'SOAP' protocol.
   InputBinding^ myInput = gcnew InputBinding;
   SoapBodyBinding^ mySoapBinding1 = gcnew SoapBodyBinding;
   mySoapBinding1->Use = SoapBindingUse::Literal;
   myInput->Extensions->Add( mySoapBinding1 );

   // Assign the 'InputBinding' to 'OperationBinding'.
   myOperationBinding->Input = myInput;

   // Create the 'OutputBinding' object' for the 'SOAP' protocol..
   OutputBinding^ myOutput = gcnew OutputBinding;
   myOutput->Extensions->Add( mySoapBinding1 );

   // Assign the 'OutPutBinding' to 'OperationBinding'.
   myOperationBinding->Output = myOutput;

   // Add the 'OperationBinding' to 'Binding'.
   myBinding->Operations->Add( myOperationBinding );

   // Add the 'Binding' to 'BindingCollection' of 'ServiceDescription'.
   myDescription->Bindings->Add( myBinding );
   Port^ soapPort = gcnew Port;
   soapPort->Name = "Service1Soap";
   soapPort->Binding = gcnew XmlQualifiedName( "s0:Service1Soap" );

   // Create a 'SoapAddressBinding' object for the 'SOAP' protocol.
   SoapAddressBinding^ mySoapAddressBinding = gcnew SoapAddressBinding;
   mySoapAddressBinding->Location = "http://localhost/AddNumbers.cs.asmx";

   // Add the 'SoapAddressBinding' to the 'Port'.
   soapPort->Extensions->Add( mySoapAddressBinding );

   // Add the 'Port' to 'PortCollection' of 'ServiceDescription'.
   myDescription->Services[ 0 ]->Ports->Add( soapPort );

   // Write the 'ServiceDescription' as a WSDL file.
   myDescription->Write( "AddNumbersOut_cs.wsdl" );
   Console::WriteLine( " 'AddNumbersOut_cs.Wsdl' file was generated" );
}
import System.*;
import System.Web.Services.Description.*;
import System.Collections.*;
import System.Xml.*;

class MySoapClass
{
    public static void main(String[]
 args)
    {
        ServiceDescription myDescription 
            = ServiceDescription.Read("AddNumbersInput_jsl.wsdl");
        // Create a 'Binding' object for the 'SOAP' protocol.
        Binding myBinding = new Binding();
        myBinding.set_Name("Service1Soap");
        XmlQualifiedName qualifiedName 
            = new XmlQualifiedName("s0:Service1Soap");
        myBinding.set_Type(qualifiedName);
        
        SoapBinding mySoapBinding = new SoapBinding();
        mySoapBinding.set_Transport(SoapBinding.HttpTransport);
        mySoapBinding.set_Style(SoapBindingStyle.Document);
        
        // Add the 'SoapBinding' object to the 'Binding' object.
        myBinding.get_Extensions().Add(mySoapBinding);
        // Create the 'OperationBinding' object for the 'SOAP' protocol.
        OperationBinding myOperationBinding = new OperationBinding();
        myOperationBinding.set_Name("AddNumbers");
        // Create the 'SoapOperationBinding' object for the 'SOAP' protocol.
        SoapOperationBinding mySoapOperationBinding 
            = new SoapOperationBinding();
        mySoapOperationBinding.set_SoapAction("http://tempuri.org/AddNumbers");
        mySoapOperationBinding.set_Style(SoapBindingStyle.Document);
        // Add the 'SoapOperationBinding' object to 'OperationBinding'
 object.
        myOperationBinding.get_Extensions().Add(mySoapOperationBinding);
        // Create the 'InputBinding' object for the 'SOAP' protocol.
        InputBinding myInput = new InputBinding();
        SoapBodyBinding mySoapBinding1 = new SoapBodyBinding();
        mySoapBinding1.set_Use(SoapBindingUse.Literal);
        myInput.get_Extensions().Add(mySoapBinding1);
        // Assign the 'InputBinding' to 'OperationBinding'.
        myOperationBinding.set_Input(myInput);
        // Create the 'OutputBinding' object' for the 'SOAP' protocol..
        OutputBinding myOutput = new OutputBinding();
        myOutput.get_Extensions().Add(mySoapBinding1);
        // Assign the 'OutPutBinding' to 'OperationBinding'.
        myOperationBinding.set_Output(myOutput);
        // Add the 'OperationBinding' to 'Binding'.
        myBinding.get_Operations().Add(myOperationBinding);
        // Add the 'Binding' to 'BindingCollection' of 'ServiceDescription'.
        myDescription.get_Bindings().Add(myBinding);

        Port soapPort = new Port();
        soapPort.set_Name("Service1Soap");
        soapPort.set_Binding(new XmlQualifiedName("s0:Service1Soap"));
        // Create a 'SoapAddressBinding' object for the 'SOAP' protocol.
        SoapAddressBinding mySoapAddressBinding = new SoapAddressBinding();
        mySoapAddressBinding.set_Location("http://localhost/AddNumbers.jsl.asmx");
        // Add the 'SoapAddressBinding' to the 'Port'.
        soapPort.get_Extensions().Add(mySoapAddressBinding);
        // Add the 'Port' to 'PortCollection' of 'ServiceDescription'.
        myDescription.get_Services().get_Item(0).get_Ports().Add(soapPort);
        // Write the 'ServiceDescription' as a WSDL file.
        myDescription.Write("AddNumbersOut_jsl.wsdl");
        Console.WriteLine(" 'AddNumbersOut_jsl.Wsdl' file was generated");
    } //main
} //MySoapClass
継承階層継承階層
System.Object
   System.Web.Services.Description.ServiceDescriptionFormatExtension
    System.Web.Services.Description.SoapOperationBinding
       System.Web.Services.Description.Soap12OperationBinding
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SoapOperationBinding メンバ
System.Web.Services.Description 名前空間

SoapOperationBinding コンストラクタ

SoapOperationBinding クラス新しインスタンス初期化します。

名前空間: System.Web.Services.Description
アセンブリ: System.Web.Services (system.web.services.dll 内)
構文構文

Dim instance As New SoapOperationBinding
public SoapOperationBinding ()
public:
SoapOperationBinding ()
public SoapOperationBinding ()
public function SoapOperationBinding ()
プラットフォームプラットフォーム
バージョン情報バージョン情報

.NET Framework

サポート対象 : 2.01.11.0
参照参照

関連項目

SoapOperationBinding クラス
SoapOperationBinding メンバ
System.Web.Services.Description 名前空間

SoapOperationBinding プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ Handled  機能拡張要素インポート時に、ServiceDescriptionFormatExtension がインポート プロセス使用されるかどうかを示す値を取得または設定します。 ( ServiceDescriptionFormatExtension から継承されます。)
パブリック プロパティ Parent  ServiceDescriptionFormatExtension の親を取得します。 ( ServiceDescriptionFormatExtension から継承されます。)
パブリック プロパティ Required  ServiceDescriptionFormatExtension参照先アクションに必要かどうかを示す値を取得または設定します。 ( ServiceDescriptionFormatExtension から継承されます。)
パブリック プロパティ SoapAction SOAP ヘッダーURI取得または設定します
パブリック プロパティ Style SoapOperationBinding で使用される SOAP バインディング種類取得または設定します
参照参照

関連項目

SoapOperationBinding クラス
System.Web.Services.Description 名前空間

SoapOperationBinding メソッド


SoapOperationBinding メンバ

XML Web サービス内の OperationBinding に追加され拡張機能表します

SoapOperationBinding データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド SoapOperationBinding  
パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ Handled  機能拡張要素インポート時に、ServiceDescriptionFormatExtension がインポート プロセス使用されるかどうかを示す値を取得または設定します。(ServiceDescriptionFormatExtension から継承されます。)
パブリック プロパティ Parent  ServiceDescriptionFormatExtension の親を取得します。(ServiceDescriptionFormatExtension から継承されます。)
パブリック プロパティ Required  ServiceDescriptionFormatExtension参照先アクションに必要かどうかを示す値を取得または設定します。(ServiceDescriptionFormatExtension から継承されます。)
パブリック プロパティ SoapAction SOAP ヘッダーURI取得または設定します
パブリック プロパティ Style SoapOperationBinding で使用される SOAP バインディング種類取得または設定します
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

SoapOperationBinding クラス
System.Web.Services.Description 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「SoapOperationBinding」の関連用語

SoapOperationBindingのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



SoapOperationBindingのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS