WebClientProtocol.Url 속성

정의

클라이언트에서 요청 중인 XML Web services의 기본 URL을 가져오거나 설정합니다.

public:
 property System::String ^ Url { System::String ^ get(); void set(System::String ^ value); };
public string Url { get; set; }
[System.ComponentModel.SettingsBindable(true)]
public string Url { get; set; }
member this.Url : string with get, set
[<System.ComponentModel.SettingsBindable(true)>]
member this.Url : string with get, set
Public Property Url As String

속성 값

클라이언트에서 요청 중인 XML Web services의 기본 URL입니다. 기본값은 Empty입니다.

특성

예제

다음 예제에서는 변경 내용을 합니다 Url 속성에 대 한는 math 라는 웹 서버에 XML 웹 서비스 http:// www.contoso.com합니다.

// Set the URL property to a different Web server than that described in the
// service description.
math->Url = "http://www.contoso.com/math.asmx";
int total = math->Add( Convert::ToInt32( Num1.Text ), Convert::ToInt32( Num2.Text ) );
// Set the URL property to a different Web server than that described in the
// service description.
math.Url = "http://www.contoso.com/math.asmx";
int total = math.Add(Convert.ToInt32(Num1.Text), Convert.ToInt32(Num2.Text));
' Set the URL property to a different Web server than that described in the
' service description.
math.Url = "http://www.contoso.com/math.asmx"
Dim total As Integer = math.Add(Convert.ToInt32(Num1.Text), _
                                 Convert.ToInt32(Num2.Text))

설명

Wsdl.exe를 사용 하 여 생성 된 프록시 클래스는 기본 설정이 Url 속성을 사용 하도록 클라이언트에 대 한 합니다. 기본 Url 생성 한 프록시 클래스는 서비스 설명에 있는 location 특성에 의해 결정 됩니다.

파생 클래스와 같은 특정 프로토콜을 지 원하는 HttpGetClientProtocol 하 고 HttpPostClientProtocol 추가 정보를 추가할 수 Url XML 웹 서비스 요청을 합니다.

Url 속성에서 프록시 클래스 생성 된 동일한 서비스 설명을 구현 하는 XML 웹 서비스를 가리키도록 변경할 수 있습니다.

적용 대상

추가 정보