WebClientProtocol.Url プロパティ

定義

クライアントが要求している XML Web サービスのベース 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 サービスのベース URL。 既定値は、Empty です。

属性

次の例では、 Url XML Web サービスの プロパティを math という名前 http:// www.contoso.comの Web サーバーに変更します。

// 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 属性によって決まります。

や などのHttpGetClientProtocolHttpPostClientProtocol特定のプロトコルをサポートする派生クラスは、XML Web サービス要求をUrl行うために 追加情報を に追加する場合があります。

プロパティは Url 、プロキシ クラスが生成されたのと同じサービス記述を実装する XML Web サービスを参照するように変更できます。

適用対象

こちらもご覧ください