ServiceDescriptionImportStyle 열거형
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
서버 또는 클라이언트 컴퓨터로 가져올지 여부를 지정합니다.
public enum class ServiceDescriptionImportStyle
public enum ServiceDescriptionImportStyle
type ServiceDescriptionImportStyle =
Public Enum ServiceDescriptionImportStyle
- 상속
필드
| Name | 값 | Description |
|---|---|---|
| Client | 0 | 클라이언트 컴퓨터에 가져오기를 만들도록 지정합니다. |
| Server | 1 | 가져오기를 서버에 만들도록 지정합니다. |
| ServerInterface | 2 | 서버 인터페이스에 가져오기를 만들도록 지정합니다. |
예제
#using <System.Web.Services.dll>
#using <System.dll>
#using <System.Xml.dll>
using namespace System;
using namespace System::Web::Services::Description;
int main()
{
try
{
ServiceDescription^ myServiceDescription = ServiceDescription::Read( "Sample_cpp.wsdl" );
ServiceDescriptionImporter^ myImporter = gcnew ServiceDescriptionImporter;
myImporter->ProtocolName = "Soap";
myImporter->AddServiceDescription( myServiceDescription, "", "" );
ServiceDescriptionImportStyle myStyle = myImporter->Style;
Console::WriteLine( "Import style: {0}", myStyle );
}
catch ( Exception^ e )
{
Console::WriteLine( "Following exception was thrown: {0}", e );
}
}
using System;
using System.Web.Services.Description;
namespace MyServiceDescription
{
class MyImporter
{
public static void Main()
{
try
{
ServiceDescription myServiceDescription =
ServiceDescription.Read("Sample_CS.wsdl");
ServiceDescriptionImporter myImporter =
new ServiceDescriptionImporter();
myImporter.ProtocolName = "Soap";
myImporter.AddServiceDescription(myServiceDescription, "", "");
ServiceDescriptionImportStyle myStyle = myImporter.Style;
Console.WriteLine("Import style: " + myStyle.ToString());
}
catch (Exception e)
{
Console.WriteLine("Following exception was thrown: "
+ e.ToString());
}
}
}
}
Imports System.Web.Services.Description
Namespace MyServiceDescription
Class MyImporter
Public Shared Sub Main()
Try
Dim myServiceDescription As ServiceDescription = _
ServiceDescription.Read("Sample_vb.wsdl")
Dim myImporter As New ServiceDescriptionImporter()
myImporter.ProtocolName = "Soap"
myImporter.AddServiceDescription(myServiceDescription, "", "")
Dim myStyle As ServiceDescriptionImportstyle = myImporter.Style
Console.WriteLine("Import style: " + myStyle.ToString())
Catch e As Exception
Console.WriteLine("Following exception was thrown: " + e.ToString())
End Try
End Sub
End Class
End Namespace 'MyServiceDescription
설명
클라이언트 컴퓨터에 대한 가져오기는 XML 웹 서비스 내에서 각 메서드를 호출하는 동기 및 비동기 메서드를 사용하여 프록시 클래스를 생성합니다. 반면에 서버 가져오기는 추상 멤버를 사용하여 추상 클래스를 생성하며, 필요한 구현을 제공하기 위해 재정의해야 합니다.