Sys.Net.WebServiceProxy Class

Enables calling a method of a specified Web service asynchronously.

Namespace: Sys.Net

Inherits: None

Members

Name

Description

Sys.Net.WebServiceProxy Constructor

Initializes a new Sys.Net.WebServiceProxy instance when implemented in a derived class.

Sys.Net.WebServiceProxy invoke Method

Calls the specified Web service method.

Sys.Net.WebServiceProxy.defaultFailedCallback Property

Gets or sets the default failed callback function for the service.

Sys.Net.WebServiceProxy.defaultSucceededCallback Property

Gets or sets the default succeeded callback function for the service.

Sys.Net.WebServiceProxy.defaultUserContext Property

Gets or sets the default user context for the service.

Sys.Net.WebServiceProxy.path Property

Gets or sets the path to the service.

Sys.Net.WebServiceProxy.timeout Property

Gets or sets the timeout in milliseconds for the service.

Remarks

The only time that you use the Sys.Net.WebServiceProxy class directly is when the Web service path is not known in advance. In that case, you cannot set the Path attribute of the <asp:ScriptReference> element in the page. A typical example is if a control binds to a Web service at run time.

Normally, you do not instantiate the WebServiceProxy class directly. Instead, you use a proxy class derived from it. This proxy class is generated as a result of including a Web service reference in a page, as shown in the following example:

<asp:ScriptManager runat="server" ID="ScriptManager1">
  <Scripts>
    <asp:ScriptReference Path="MyScript.js" />
  </Scripts>
</asp:ScriptManager>

Each generated proxy class method calls the invoke method to call the related Web service method.

Note

Invoking a proxy method from a JavaScript function performs an asynchronous Web request that invokes the corresponding Web service method. When the request returns, the appropriate JavaScript callback function is called.

See Also

Concepts

Sys.Services.AuthenticationService Class

Sys.Services.ProfileService Class

Calling Web Services from Client Script