MimeXmlBinding 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
MimePart, InputBinding 또는 OutputBinding에 추가되는 확장성 요소를 나타내며 SOAP와 호환되지 않는 XML 메시지에 대한 스키마를 지정합니다. 이 클래스는 상속될 수 없습니다.
public ref class MimeXmlBinding sealed : System::Web::Services::Description::ServiceDescriptionFormatExtension
[System.Web.Services.Configuration.XmlFormatExtension("mimeXml", "http://schemas.xmlsoap.org/wsdl/mime/", typeof(System.Web.Services.Description.MimePart), typeof(System.Web.Services.Description.InputBinding), typeof(System.Web.Services.Description.OutputBinding))]
public sealed class MimeXmlBinding : System.Web.Services.Description.ServiceDescriptionFormatExtension
[<System.Web.Services.Configuration.XmlFormatExtension("mimeXml", "http://schemas.xmlsoap.org/wsdl/mime/", typeof(System.Web.Services.Description.MimePart), typeof(System.Web.Services.Description.InputBinding), typeof(System.Web.Services.Description.OutputBinding))>]
type MimeXmlBinding = class
inherit ServiceDescriptionFormatExtension
Public NotInheritable Class MimeXmlBinding
Inherits ServiceDescriptionFormatExtension
- 상속
- 특성
예제
다음 예제에서는의 일반적인 용도 MimeXmlBinding
클래스입니다.
#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( "MimeXmlBinding_Part_3_Input_CPP.wsdl" );
// Create the 'Binding' object.
Binding^ myBinding = gcnew Binding;
// Initialize 'Name' property of 'Binding' class.
myBinding->Name = "MimeXmlBinding_Part_3_ServiceHttpPost";
XmlQualifiedName^ myXmlQualifiedName = gcnew XmlQualifiedName( "s0:MimeXmlBinding_Part_3_ServiceHttpPost" );
myBinding->Type = myXmlQualifiedName;
// Create the 'HttpBinding' object.
HttpBinding^ myHttpBinding = gcnew HttpBinding;
myHttpBinding->Verb = "POST";
// Add the 'HttpBinding' to the 'Binding'.
myBinding->Extensions->Add( myHttpBinding );
// Create the 'OperationBinding' object.
OperationBinding^ myOperationBinding = gcnew OperationBinding;
myOperationBinding->Name = "AddNumbers";
HttpOperationBinding^ myHttpOperationBinding = gcnew HttpOperationBinding;
myHttpOperationBinding->Location = "/AddNumbers";
// Add the 'HttpOperationBinding' to 'OperationBinding'.
myOperationBinding->Extensions->Add( myHttpOperationBinding );
// Create the 'InputBinding' object.
InputBinding^ myInputBinding = gcnew InputBinding;
MimeContentBinding^ myMimeContentBinding = gcnew MimeContentBinding;
myMimeContentBinding->Type = "application/x-www-form-urlencoded";
myInputBinding->Extensions->Add( myMimeContentBinding );
// Add the 'InputBinding' to 'OperationBinding'.
myOperationBinding->Input = myInputBinding;
// Create an OutputBinding.
OutputBinding^ myOutputBinding = gcnew OutputBinding;
MimeXmlBinding^ myMimeXmlBinding = gcnew MimeXmlBinding;
// Initialize the Part property of the MimeXmlBinding.
myMimeXmlBinding->Part = "Body";
// Add the MimeXmlBinding to the OutputBinding.
myOutputBinding->Extensions->Add( myMimeXmlBinding );
// Add the 'OutPutBinding' to 'OperationBinding'.
myOperationBinding->Output = myOutputBinding;
// Add the 'OperationBinding' to 'Binding'.
myBinding->Operations->Add( myOperationBinding );
// Add the 'Binding' to 'BindingCollection' of 'ServiceDescription'.
myDescription->Bindings->Add( myBinding );
// Write the 'ServiceDescription' as a WSDL file.
myDescription->Write( "MimeXmlBinding_Part_3_Output_CPP.wsdl" );
Console::WriteLine( "WSDL file with name 'MimeXmlBinding_Part_3_Output_CPP.wsdl' is"
" created successfully." );
}
catch ( Exception^ e )
{
Console::WriteLine( "Exception: {0}", e->Message );
}
}
using System;
using System.Web.Services.Description;
using System.Collections;
using System.Xml;
class MyXmlBinding
{
public static void Main()
{
try
{
ServiceDescription myDescription =
ServiceDescription.Read("MimeXmlBinding_Part_3_Input_CS.wsdl");
// Create the 'Binding' object.
Binding myBinding = new Binding();
// Initialize 'Name' property of 'Binding' class.
myBinding.Name = "MimeXmlBinding_Part_3_ServiceHttpPost";
XmlQualifiedName
myXmlQualifiedName = new XmlQualifiedName("s0:MimeXmlBinding_Part_3_ServiceHttpPost");
myBinding.Type = myXmlQualifiedName;
// Create the 'HttpBinding' object.
HttpBinding myHttpBinding = new HttpBinding();
myHttpBinding.Verb="POST";
// Add the 'HttpBinding' to the 'Binding'.
myBinding.Extensions.Add(myHttpBinding);
// Create the 'OperationBinding' object.
OperationBinding myOperationBinding = new OperationBinding();
myOperationBinding.Name = "AddNumbers";
HttpOperationBinding myHttpOperationBinding = new HttpOperationBinding();
myHttpOperationBinding.Location="/AddNumbers";
// Add the 'HttpOperationBinding' to 'OperationBinding'.
myOperationBinding.Extensions.Add(myHttpOperationBinding);
// Create the 'InputBinding' object.
InputBinding myInputBinding = new InputBinding();
MimeContentBinding myMimeContentBinding = new MimeContentBinding();
myMimeContentBinding.Type="application/x-www-form-urlencoded";
myInputBinding.Extensions.Add(myMimeContentBinding);
// Add the 'InputBinding' to 'OperationBinding'.
myOperationBinding.Input = myInputBinding;
// Create an OutputBinding.
OutputBinding myOutputBinding = new OutputBinding();
MimeXmlBinding myMimeXmlBinding = new MimeXmlBinding();
// Initialize the Part property of the MimeXmlBinding.
myMimeXmlBinding.Part="Body";
// Add the MimeXmlBinding to the OutputBinding.
myOutputBinding.Extensions.Add(myMimeXmlBinding);
// Add the 'OutPutBinding' to 'OperationBinding'.
myOperationBinding.Output = myOutputBinding;
// Add the 'OperationBinding' to 'Binding'.
myBinding.Operations.Add(myOperationBinding);
// Add the 'Binding' to 'BindingCollection' of 'ServiceDescription'.
myDescription.Bindings.Add(myBinding);
// Write the 'ServiceDescription' as a WSDL file.
myDescription.Write("MimeXmlBinding_Part_3_Output_CS.wsdl");
Console.WriteLine("WSDL file with name 'MimeXmlBinding_Part_3_Output_CS.wsdl' is"
+ " created successfully.");
}
catch(Exception e)
{
Console.WriteLine( "Exception: {0}", e.Message );
}
}
}
Imports System.Web.Services.Description
Imports System.Collections
Imports System.Xml
Class MyXmlBinding
Public Shared Sub Main()
Try
Dim myDescription As ServiceDescription = ServiceDescription.Read _
("MimeXmlBinding_Part_3_Input_VB.wsdl")
' Create the 'Binding' object.
Dim myBinding As New Binding()
' Initialize 'Name' property of 'Binding' class.
myBinding.Name = "MimeXmlBinding_Part_3_ServiceHttpPost"
Dim myXmlQualifiedName As New XmlQualifiedName("s0:MimeXmlBinding_Part_3_ServiceHttpPost")
myBinding.Type = myXmlQualifiedName
' Create the 'HttpBinding' object.
Dim myHttpBinding As New HttpBinding()
myHttpBinding.Verb = "POST"
' Add the 'HttpBinding' to the 'Binding'.
myBinding.Extensions.Add(myHttpBinding)
' Create the 'OperationBinding' object.
Dim myOperationBinding As New OperationBinding()
myOperationBinding.Name = "AddNumbers"
Dim myHttpOperationBinding As New HttpOperationBinding()
myHttpOperationBinding.Location = "/AddNumbers"
' Add the 'HttpOperationBinding' to 'OperationBinding'.
myOperationBinding.Extensions.Add(myHttpOperationBinding)
' Create the 'InputBinding' object.
Dim myInputBinding As New InputBinding()
Dim myMimeContentBinding As New MimeContentBinding()
myMimeContentBinding.Type = "application/x-www-form-urlencoded"
myInputBinding.Extensions.Add(myMimeContentBinding)
' Add the 'InputBinding' to 'OperationBinding'.
myOperationBinding.Input = myInputBinding
' Create an OutputBinding.
Dim myOutputBinding As New OutputBinding()
Dim myMimeXmlBinding As New MimeXmlBinding()
' Initialize the Part property of the MimeXmlBinding.
myMimeXmlBinding.Part = "Body"
' Add the MimeXmlBinding to the OutputBinding.
myOutputBinding.Extensions.Add(myMimeXmlBinding)
' Add the 'OutPutBinding' to 'OperationBinding'.
myOperationBinding.Output = myOutputBinding
' Add the 'OperationBinding' to 'Binding'.
myBinding.Operations.Add(myOperationBinding)
' Add the 'Binding' to 'BindingCollection' of 'ServiceDescription'.
myDescription.Bindings.Add(myBinding)
' Write the 'ServiceDescription' as a WSDL file.
myDescription.Write("MimeXmlBinding_Part_3_Output_VB.wsdl")
Console.WriteLine("WSDL file with name 'MimeXmlBinding_Part_3_Output_VB.wsdl' is" + _
" created successfully.")
Catch e As Exception
Console.WriteLine("Exception: {0}", e.Message)
End Try
End Sub
End Class
설명
XML 웹 서비스에 대한 프로토콜을 지정하는 방법에 대한 자세한 내용은 ASP.NET 사용하여 XML Web Services를 참조하세요. WSDL(Web Services Description Language)에 대한 자세한 내용은 WSDL 사양을 참조하세요.
생성자
MimeXmlBinding() |
MimeXmlBinding 클래스의 새 인스턴스를 초기화합니다. |
속성
Handled |
확장성 요소를 가져올 때 ServiceDescriptionFormatExtension이 가져오기 프로세스에서 사용되는지 여부를 나타내는 값을 가져오거나 설정합니다. (다음에서 상속됨 ServiceDescriptionFormatExtension) |
Parent |
ServiceDescriptionFormatExtension의 상위를 가져옵니다. (다음에서 상속됨 ServiceDescriptionFormatExtension) |
Part |
MessagePart을 적용할 MimeXmlBinding의 이름을 가져오거나 설정합니다. |
Required |
ServiceDescriptionFormatExtension이 참조하는 작업에 이것이 필요한지 여부를 나타내는 값을 가져오거나 설정합니다. (다음에서 상속됨 ServiceDescriptionFormatExtension) |
메서드
Equals(Object) |
지정된 개체가 현재 개체와 같은지 확인합니다. (다음에서 상속됨 Object) |
GetHashCode() |
기본 해시 함수로 작동합니다. (다음에서 상속됨 Object) |
GetType() |
현재 인스턴스의 Type을 가져옵니다. (다음에서 상속됨 Object) |
MemberwiseClone() |
현재 Object의 단순 복사본을 만듭니다. (다음에서 상속됨 Object) |
ToString() |
현재 개체를 나타내는 문자열을 반환합니다. (다음에서 상속됨 Object) |
적용 대상
.NET