다음을 통해 공유


ServiceDescription.Read 메서드

정의

XML을 직접 로드하여 ServiceDescription 클래스의 인스턴스를 초기화합니다.

오버로드

Read(XmlReader, Boolean)

ServiceDescription에서 XML을 직접 로드하여 XmlReader 클래스의 인스턴스를 초기화합니다.

Read(String, Boolean)

지정된 파일에서 XML을 직접 로드하여 ServiceDescription 개체의 인스턴스를 초기화합니다.

Read(Stream, Boolean)

ServiceDescription 인스턴스에서 XML을 직접 로드하여 Stream 클래스의 인스턴스를 초기화합니다.

Read(TextReader, Boolean)

ServiceDescription에서 XML을 직접 로드하여 TextReader 클래스의 인스턴스를 초기화합니다.

Read(String)

지정된 파일에서 XML을 직접 로드하여 ServiceDescription 개체의 인스턴스를 초기화합니다.

Read(TextReader)

ServiceDescription에서 XML을 직접 로드하여 TextReader 클래스의 인스턴스를 초기화합니다.

Read(Stream)

ServiceDescription 인스턴스에서 XML을 직접 로드하여 Stream 클래스의 인스턴스를 초기화합니다.

Read(XmlReader)

ServiceDescription에서 XML을 직접 로드하여 XmlReader 클래스의 인스턴스를 초기화합니다.

Read(XmlReader, Boolean)

Source:
ServiceDescription.cs
Source:
ServiceDescription.cs
Source:
ServiceDescription.cs

ServiceDescription에서 XML을 직접 로드하여 XmlReader 클래스의 인스턴스를 초기화합니다.

public:
 static System::Web::Services::Description::ServiceDescription ^ Read(System::Xml::XmlReader ^ reader, bool validate);
public static System.Web.Services.Description.ServiceDescription Read (System.Xml.XmlReader reader, bool validate);
static member Read : System.Xml.XmlReader * bool -> System.Web.Services.Description.ServiceDescription
Public Shared Function Read (reader As XmlReader, validate As Boolean) As ServiceDescription

매개 변수

reader
XmlReader

참조로 전달된 XmlReader이며 읽을 XML 데이터가 들어 있습니다.

validate
Boolean

Boolean에서 지정하는 스키마에 대해 XML의 유효성을 검사해야 하는지 여부를 나타내는 Schema입니다.

반환

ServiceDescription인스턴스

적용 대상

Read(String, Boolean)

Source:
ServiceDescription.cs
Source:
ServiceDescription.cs
Source:
ServiceDescription.cs

지정된 파일에서 XML을 직접 로드하여 ServiceDescription 개체의 인스턴스를 초기화합니다.

public:
 static System::Web::Services::Description::ServiceDescription ^ Read(System::String ^ fileName, bool validate);
public static System.Web.Services.Description.ServiceDescription Read (string fileName, bool validate);
static member Read : string * bool -> System.Web.Services.Description.ServiceDescription
Public Shared Function Read (fileName As String, validate As Boolean) As ServiceDescription

매개 변수

fileName
String

읽을 파일의 경로입니다.

validate
Boolean

Boolean에서 지정하는 스키마에 대해 XML의 유효성을 검사해야 하는지 여부를 나타내는 Schema입니다.

반환

ServiceDescription인스턴스

적용 대상

Read(Stream, Boolean)

Source:
ServiceDescription.cs
Source:
ServiceDescription.cs
Source:
ServiceDescription.cs

ServiceDescription 인스턴스에서 XML을 직접 로드하여 Stream 클래스의 인스턴스를 초기화합니다.

public:
 static System::Web::Services::Description::ServiceDescription ^ Read(System::IO::Stream ^ stream, bool validate);
public static System.Web.Services.Description.ServiceDescription Read (System.IO.Stream stream, bool validate);
static member Read : System.IO.Stream * bool -> System.Web.Services.Description.ServiceDescription
Public Shared Function Read (stream As Stream, validate As Boolean) As ServiceDescription

매개 변수

stream
Stream

참조로 전달된 Stream이며 읽을 바이트가 들어 있습니다.

validate
Boolean

Boolean에서 지정하는 스키마에 대해 XML의 유효성을 검사해야 하는지 여부를 나타내는 Schema입니다.

반환

ServiceDescription인스턴스

적용 대상

Read(TextReader, Boolean)

Source:
ServiceDescription.cs
Source:
ServiceDescription.cs
Source:
ServiceDescription.cs

ServiceDescription에서 XML을 직접 로드하여 TextReader 클래스의 인스턴스를 초기화합니다.

public:
 static System::Web::Services::Description::ServiceDescription ^ Read(System::IO::TextReader ^ textReader, bool validate);
public static System.Web.Services.Description.ServiceDescription Read (System.IO.TextReader textReader, bool validate);
static member Read : System.IO.TextReader * bool -> System.Web.Services.Description.ServiceDescription
Public Shared Function Read (textReader As TextReader, validate As Boolean) As ServiceDescription

매개 변수

textReader
TextReader

참조로 전달된 TextReader 인스턴스이며 읽을 바이트가 들어 있습니다.

validate
Boolean

Boolean에서 지정하는 스키마에 대해 XML의 유효성을 검사해야 하는지 여부를 나타내는 Schema입니다.

반환

ServiceDescription인스턴스

적용 대상

Read(String)

Source:
ServiceDescription.cs
Source:
ServiceDescription.cs
Source:
ServiceDescription.cs

지정된 파일에서 XML을 직접 로드하여 ServiceDescription 개체의 인스턴스를 초기화합니다.

public:
 static System::Web::Services::Description::ServiceDescription ^ Read(System::String ^ fileName);
public static System.Web.Services.Description.ServiceDescription Read (string fileName);
static member Read : string -> System.Web.Services.Description.ServiceDescription
Public Shared Function Read (fileName As String) As ServiceDescription

매개 변수

fileName
String

읽을 파일의 경로입니다.

반환

ServiceDescription인스턴스

예제

ServiceDescription^ myDescription = gcnew ServiceDescription;
myDescription = ServiceDescription::Read( "MyWsdl_CS.wsdl" );
myDescription->Name = "MyServiceDescription";
Console::WriteLine( "Name: {0}", myDescription->Name );
MessageCollection^ myMessageCollection = myDescription->Messages;

// Remove the message at index 0 from the message collection.
myMessageCollection->Remove( myDescription->Messages[ 0 ] );

// Build a new message.
Message^ myMessage = gcnew Message;
myMessage->Name = "AddSoapIn";

// Build a new MessagePart.
MessagePart^ myMessagePart = gcnew MessagePart;
myMessagePart->Name = "parameters";
XmlQualifiedName^ myXmlQualifiedName = gcnew XmlQualifiedName( "s0:Add" );
myMessagePart->Element = myXmlQualifiedName;

// Add MessageParts to the message.
myMessage->Parts->Add( myMessagePart );

// Add the message to the ServiceDescription.
myDescription->Messages->Add( myMessage );
myDescription->Write( "MyOutWsdl.wsdl" );

ServiceDescription myDescription = new ServiceDescription();
myDescription = ServiceDescription.Read("MyWsdl_CS.wsdl");
myDescription.Name = "MyServiceDescription";
Console.WriteLine("Name: " + myDescription.Name);
MessageCollection myMessageCollection = myDescription.Messages;

// Remove the message at index 0 from the message collection.
myMessageCollection.Remove(myDescription.Messages[0]);

// Build a new message.
Message myMessage = new Message();
myMessage.Name = "AddSoapIn";

// Build a new MessagePart.
MessagePart myMessagePart = new MessagePart();
myMessagePart.Name = "parameters";
XmlQualifiedName myXmlQualifiedName = new XmlQualifiedName("s0:Add");
myMessagePart.Element = myXmlQualifiedName;

// Add MessageParts to the message.
myMessage.Parts.Add(myMessagePart);

// Add the message to the ServiceDescription.
myDescription.Messages.Add(myMessage);
myDescription.Write("MyOutWsdl.wsdl");
Dim myDescription As New ServiceDescription()
myDescription = ServiceDescription.Read("MyWsdl_VB.wsdl")
myDescription.Name = "MyServiceDescription"
Console.WriteLine("Name: " & myDescription.Name)
Dim myMessageCollection As MessageCollection = myDescription.Messages

' Remove the message at index 0 from the message collection.
myMessageCollection.Remove(myDescription.Messages(0))

' Build a new Message.
Dim myMessage As New Message()
myMessage.Name = "AddSoapIn"

' Build a new MessagePart.
Dim myMessagePart As New MessagePart()
myMessagePart.Name = "parameters"
Dim myXmlQualifiedName As New XmlQualifiedName("s0:Add")
myMessagePart.Element = myXmlQualifiedName

' Add MessageParts to the message.
myMessage.Parts.Add(myMessagePart)

' Add the message to the ServiceDescription.
myDescription.Messages.Add(myMessage)
myDescription.Write("MyOutWsdl.wsdl")

적용 대상

Read(TextReader)

Source:
ServiceDescription.cs
Source:
ServiceDescription.cs
Source:
ServiceDescription.cs

ServiceDescription에서 XML을 직접 로드하여 TextReader 클래스의 인스턴스를 초기화합니다.

public:
 static System::Web::Services::Description::ServiceDescription ^ Read(System::IO::TextReader ^ textReader);
public static System.Web.Services.Description.ServiceDescription Read (System.IO.TextReader textReader);
static member Read : System.IO.TextReader -> System.Web.Services.Description.ServiceDescription
Public Shared Function Read (textReader As TextReader) As ServiceDescription

매개 변수

textReader
TextReader

참조로 전달된 TextReader 인스턴스이며 읽을 바이트가 들어 있습니다.

반환

ServiceDescription인스턴스

예제

ServiceDescription^ myDescription = gcnew ServiceDescription;

// Create a StreamReader to read a WSDL file.
TextReader^ myTextReader = gcnew StreamReader( "MyWsdl.wsdl" );
myDescription = ServiceDescription::Read( myTextReader );
Console::WriteLine( "Bindings are: " );

// Display the Bindings present in the WSDL file.
System::Collections::IEnumerator^ myEnum = myDescription->Bindings->GetEnumerator();
while ( myEnum->MoveNext() )
{
   Binding^ myBinding = safe_cast<Binding^>(myEnum->Current);
   Console::WriteLine( myBinding->Name );
}
ServiceDescription myDescription = new ServiceDescription();

// Create a StreamReader to read a WSDL file.
TextReader myTextReader = new StreamReader("MyWsdl.wsdl");
myDescription = ServiceDescription.Read(myTextReader);
Console.WriteLine("Bindings are: ");

// Display the Bindings present in the WSDL file.
foreach(Binding myBinding in myDescription.Bindings)
{
   Console.WriteLine(myBinding.Name);
}
Dim myDescription As New ServiceDescription()

' Create a StreamReader to read a WSDL file.
Dim myTextReader = New StreamReader("MyWsdl.wsdl")
myDescription = ServiceDescription.Read(myTextReader)
Console.WriteLine("Bindings are: ")

' Display the Bindings present in the WSDL file.
Dim myBinding As Binding
For Each myBinding In myDescription.Bindings
   Console.WriteLine(myBinding.Name)
Next myBinding

적용 대상

Read(Stream)

Source:
ServiceDescription.cs
Source:
ServiceDescription.cs
Source:
ServiceDescription.cs

ServiceDescription 인스턴스에서 XML을 직접 로드하여 Stream 클래스의 인스턴스를 초기화합니다.

public:
 static System::Web::Services::Description::ServiceDescription ^ Read(System::IO::Stream ^ stream);
public static System.Web.Services.Description.ServiceDescription Read (System.IO.Stream stream);
static member Read : System.IO.Stream -> System.Web.Services.Description.ServiceDescription
Public Shared Function Read (stream As Stream) As ServiceDescription

매개 변수

stream
Stream

참조로 전달된 Stream이며 읽을 바이트가 들어 있습니다.

반환

ServiceDescription인스턴스

예제

// Create a StreamReader to read a WSDL file.
StreamReader^ myStreamReader = gcnew StreamReader( "MyWsdl.wsdl" );
ServiceDescription^ myDescription = ServiceDescription::Read( myStreamReader );
Console::WriteLine( "Bindings are: " );

// Display the Bindings present in the WSDL file.
System::Collections::IEnumerator^ myEnum = myDescription->Bindings->GetEnumerator();
while ( myEnum->MoveNext() )
{
   Binding^ myBinding = safe_cast<Binding^>(myEnum->Current);
   Console::WriteLine( myBinding->Name );
}
// Create a StreamReader to read a WSDL file.
StreamReader myStreamReader = new StreamReader("MyWsdl.wsdl");
ServiceDescription myDescription =
   ServiceDescription.Read(myStreamReader);
Console.WriteLine("Bindings are:");

// Display the Bindings present in the WSDL file.
foreach(Binding myBinding in myDescription.Bindings)
{
   Console.WriteLine(myBinding.Name);
}
' Create a StreamReader to read a WSDL file.
Dim myStreamReader As New StreamReader("MyWsdl.wsdl")
Dim myDescription As ServiceDescription = _
   ServiceDescription.Read(myStreamReader)
Console.WriteLine("Bindings are :")

' Display the Bindings present in the WSDL file.
Dim myBinding As Binding
For Each myBinding In myDescription.Bindings
   Console.WriteLine(myBinding.Name)
Next myBinding

적용 대상

Read(XmlReader)

Source:
ServiceDescription.cs
Source:
ServiceDescription.cs
Source:
ServiceDescription.cs

ServiceDescription에서 XML을 직접 로드하여 XmlReader 클래스의 인스턴스를 초기화합니다.

public:
 static System::Web::Services::Description::ServiceDescription ^ Read(System::Xml::XmlReader ^ reader);
public static System.Web.Services.Description.ServiceDescription Read (System.Xml.XmlReader reader);
static member Read : System.Xml.XmlReader -> System.Web.Services.Description.ServiceDescription
Public Shared Function Read (reader As XmlReader) As ServiceDescription

매개 변수

reader
XmlReader

참조로 전달된 XmlReader이며 읽을 XML 데이터가 들어 있습니다.

반환

ServiceDescription인스턴스

예제

// Create a new XmlTextWriter with specified URL.
XmlTextReader^ myXmlReader = gcnew XmlTextReader( "All_CS.wsdl" );
ServiceDescription^ myServiceDescription = ServiceDescription::Read( myXmlReader );
myServiceDescription->TargetNamespace = "http://tempuri.org/";

// Remove the service named MathService.
ServiceCollection^ myServiceDescriptionCollection = myServiceDescription->Services;
myServiceDescriptionCollection->Remove( myServiceDescription->Services[ "MathService" ] );
// Create a new XmlTextWriter with specified URL.
XmlTextReader myXmlReader = new XmlTextReader("All_CS.wsdl");
ServiceDescription myServiceDescription =
   ServiceDescription.Read(myXmlReader);
myServiceDescription.TargetNamespace = "http://tempuri.org/";

// Remove the service named MathService.
ServiceCollection myServiceDescriptionCollection =
   myServiceDescription.Services;
myServiceDescriptionCollection.Remove(
   myServiceDescription.Services["MathService"]);
' Create a new XmlTextWriter with specified URL.
Dim myXmlReader As New XmlTextReader("All_VB.wsdl")
Dim myServiceDescription As ServiceDescription = _
   ServiceDescription.Read(myXmlReader)
myServiceDescription.TargetNamespace = "http://tempuri.org/"

' Remove the service named MathService.
Dim myServiceDescriptionCollection As ServiceCollection = _
   myServiceDescription.Services
myServiceDescriptionCollection.Remove( _
   myServiceDescription.Services("MathService"))

적용 대상