다음을 통해 공유


WebClientProtocol.Url 속성

정의

클라이언트가 요청하는 XML 웹 서비스의 기본 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 웹 서비스의 기본 URL입니다. 기본값은 Empty입니다.

특성

예제

다음 예제에서는 XML 웹 서비스의 속성을 math 이름이 지정된 http:// www.contoso.com웹 서버로 변경 Url 합니다.

// 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 은 프록시 클래스가 생성된 서비스 설명에 있는 위치 특성에 따라 결정됩니다.

특정 프로토콜을 지원하는 파생 클래스(예: HttpGetClientProtocolHttpPostClientProtocol XML 웹 서비스 요청을 만들기 위해 Url 추가 정보를 추가할 수 있습니다).

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

적용 대상

추가 정보