Sys.Net.WebServiceProxy Class
Provides a way to call a method of a specified Web service asynchronously.
Namespace: Sys.Net
Inherits: None
Members
Name |
Description |
---|---|
When implemented in a derived class, initializes a new instance of the Sys.Net.WebServiceProxy class. |
|
Calls the specified Web service method. |
|
Gets or sets the default failed callback function for the service. |
|
Gets or sets the default succeeded callback function for the service. |
|
Gets or sets the default user context for the service. |
|
Gets or sets a value that indicates whether the service supports JSONP for cross-domain calls. |
|
Gets or sets a value that specifies the callback function name for a JSONP request. |
|
Gets or sets the path to the service. |
|
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 ScriptReference control 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 that derives 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