SoapBinding 클래스

정의

검색 문서에 있는 SOAP 바인딩을 나타냅니다. 이 클래스는 상속될 수 없습니다.

public ref class SoapBinding sealed
public sealed class SoapBinding
type SoapBinding = class
Public NotInheritable Class SoapBinding
상속
SoapBinding

예제

#using <System.dll>
#using <System.Xml.dll>
#using <System.Web.Services.dll>

using namespace System;
using namespace System::Net;
using namespace System::Xml;
using namespace System::Web::Services::Discovery;
int main()
{
   try
   {
      
      // 'dataservice.disco' is a sample discovery document.
      String^ myStringUrl = "http://localhost/dataservice.disco";
      
      // Call the Discover method to populate the Documents property.
      DiscoveryClientProtocol^ myDiscoveryClientProtocol = gcnew DiscoveryClientProtocol;
      myDiscoveryClientProtocol->Credentials = CredentialCache::DefaultCredentials;
      DiscoveryDocument^ myDiscoveryDocument = myDiscoveryClientProtocol->Discover( myStringUrl );
      Console::WriteLine( "Demonstrating the Discovery::SoapBinding class." );
      
      // Create a SOAP binding.
      SoapBinding^ mySoapBinding = gcnew SoapBinding;
      
      // Assign an address to the created SOAP binding.
      mySoapBinding->Address = "http://schemas.xmlsoap.org/disco/scl/";
      
      // Bind the created SOAP binding with a new XmlQualifiedName.
      mySoapBinding->Binding = gcnew XmlQualifiedName( "String*","http://www.w3.org/2001/XMLSchema" );
      
      // Add the created SOAP binding to the DiscoveryClientProtocol.
      myDiscoveryClientProtocol->AdditionalInformation->Add( mySoapBinding );
      
      // Display the namespace associated with SOAP binding.
      Console::WriteLine( "Namespace associated with the SOAP binding is: {0}", SoapBinding::Namespace );
      
      // Write all the information of the DiscoveryClientProtocol.
      myDiscoveryClientProtocol->WriteAll( ".", "results.discomap" );
      
   }
   catch ( Exception^ e ) 
   {
      Console::WriteLine( e );
   }

}
using System;
using System.Net;
using System.Security.Permissions;
using System.Xml;
using System.Web.Services.Discovery;

class DiscoverySoapBindingClass
{
   static void Main()
   {
      Run();
   }

   [PermissionSetAttribute(SecurityAction.Demand, Name="FullTrust")]
   static void Run()
   {
      try
      {
         // 'dataservice.disco' is a sample discovery document.
         string myStringUrl = "http://localhost/dataservice.disco";

         // Call the Discover method to populate the Documents property.
         DiscoveryClientProtocol myDiscoveryClientProtocol =
             new DiscoveryClientProtocol();
         myDiscoveryClientProtocol.Credentials =
             CredentialCache.DefaultCredentials;
         DiscoveryDocument myDiscoveryDocument =
             myDiscoveryClientProtocol.Discover(myStringUrl);

         Console.WriteLine("Demonstrating the Discovery.SoapBinding class.");

         // Create a SOAP binding.
         SoapBinding mySoapBinding = new SoapBinding();

         // Assign an address to the created SOAP binding.
         mySoapBinding.Address = "http://schemas.xmlsoap.org/disco/scl/";

         // Bind the created SOAP binding with a new XmlQualifiedName.
         mySoapBinding.Binding = new XmlQualifiedName("string",
             "http://www.w3.org/2001/XMLSchema");

         // Add the created SOAP binding to the DiscoveryClientProtocol.
         myDiscoveryClientProtocol.AdditionalInformation.Add(mySoapBinding);

         // Display the namespace associated with SOAP binding.
         Console.WriteLine("Namespace associated with the SOAP binding is: "
             + SoapBinding.Namespace);

         // Write all the information of the DiscoveryClientProtocol.
         myDiscoveryClientProtocol.WriteAll(".","results.discomap");

      }
      catch (Exception e)
      {

         Console.WriteLine(e.ToString());
      }
   }
}
Imports System.Net
Imports System.Security.Permissions
Imports System.Xml
Imports System.Web.Services.Discovery

Class DiscoverySoapBindingMod

   Shared Sub Main()
      Run()
   End Sub

   <PermissionSetAttribute(SecurityAction.Demand, Name := "FullTrust")> _
   Shared Sub Run()

      Try


         ' 'dataservice.disco' is a sample discovery document.
         Dim myStringUrl As String = "http://localhost/dataservice.disco"

         ' Call the Discover method to populate the Documents property.
         Dim myDiscoveryClientProtocol As DiscoveryClientProtocol = _
             New DiscoveryClientProtocol()
         myDiscoveryClientProtocol.Credentials = _
             CredentialCache.DefaultCredentials
         Dim myDiscoveryDocument As DiscoveryDocument = _
             myDiscoveryClientProtocol.Discover(myStringUrl)

         Console.WriteLine("Demonstrating the Discovery.SoapBinding class.")

         ' Create a SOAP binding.
         Dim mySoapBinding As SoapBinding = New SoapBinding()

         ' Assign the address to the SOAP binding.
         mySoapBinding.Address = "http://schemas.xmlsoap.org/disco/scl/"

         ' Bind the created SOAP binding with a new XmlQualifiedName.
         mySoapBinding.Binding = New XmlQualifiedName("string", _
             "http://www.w3.org/2001/XMLSchema")

         ' Add the created SOAP binding to the DiscoveryClientProtocol.
         myDiscoveryClientProtocol.AdditionalInformation.Add(mySoapBinding)

         ' Display the namespace associated with the SOAP binding.
         Console.WriteLine("Namespace associated with Soap Binding is: " _
             + SoapBinding.Namespace)

         ' Write all the information of the DiscoveryClientProtocol. 
         myDiscoveryClientProtocol.WriteAll(".","results.discomap")


      Catch e As Exception
         Console.WriteLine(e.ToString)
      End Try

   End Sub
End Class

설명

SOAP 바인딩은 XML 웹 서비스의 인터페이스와 유사합니다. 버전 관리 및 특정 SOAP 바인딩을 구현하는 XML 웹 서비스를 찾을 때 유용합니다. instance 경우 검색 문서에 참조된 Web Services에서 구현한 SOAP 바인딩을 지정하는 SOAP 바인딩에 대한 선택적 정보가 포함될 수 있습니다. SOAP 바인딩은 XML 네임스페이스가 상수와 같은 Namespace XML 요소를 추가하여 SOAP 검색 문서에 포함된 XML 문서 내에 지정됩니다. 속성은 Address XML 웹 서비스의 URL을 지정하고 속성은 Binding 해당 XML 웹 서비스에서 구현한 SOAP 바인딩을 지정합니다.

생성자

SoapBinding()

SoapBinding 클래스의 새 인스턴스를 초기화합니다.

필드

Namespace

검색 문서 내에 SOAP 바인딩을 지정하는 요소의 XML 네임스페이스입니다.

속성

Address

SOAP 바인딩을 구현하는 XML Web services의 URL을 가져오거나 설정합니다.

Binding

XML Web services에서 구현하는 SOAP 바인딩의 XML 정규화된 이름을 가져오거나 설정합니다.

메서드

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상