Setting the web reference behavior

If your application must dynamically supply the IBM® Content Classification URL, you must set the web reference URL behavior accordingly, and programmatically supply the URL before you use the proxy.

About this task

To set the web reference behavior:

Procedure

  1. On the Web Reference menu in the Solution Explorer, click Properties.
  2. In the Properties window, click URL Behavior and select Dynamic.

Results

To supply the URL programmatically, set the URL property of the proxy class. This must be done before any web methods are called. For example, if the name of the web reference is BNS, the C# code looks like the following example:

BNS.BanterServerWebService srv = new BNS.BanterServerWebService();

srv.Url = yourUrl;

// Call web methods