WebServicesClientProtocol.GetWebRequest Method

Creates a System.Net.WebRequest instance for the specified URI. Creates a System.Net.WebRequest for the specified URI.

Namespace: Microsoft.Web.Services2
Assembly: Microsoft.Web.Services2 (in microsoft.web.services2.dll)

Usage

'Usage
Public Class webServicesClientProtocolImplementation
    Inherits WebServicesClientProtocol
        Protected Overrides Function GetWebRequest(uri As Uri)
            MyBase.GetWebRequest(uri)
        End Function
End Class

Syntax

'Declaration
Protected Overrides Function GetWebRequest( _
    ByVal uri As Uri _
) As WebRequest
protected override WebRequest GetWebRequest(
    Uri uri
);
protected: virtual WebRequest^ GetWebRequest(
    Uri^ uri
);
protected WebRequest GetWebRequest(
    Uri uri
);
protected override function GetWebRequest(
     uri : Uri
) : WebRequest;

Parameters

  • uri
    The System.Uri to use when creating the WebRequest.

Return Value

A System.Net.WebRequest representing a request to a specified URI.

Return Value

The new System.Net.WebRequest.

Exceptions

Exception type Condition
System.ArgumentException

uri is not accessible through the Hypertext Transfer or Secure Hypertext Transfer protocols (HTTP and HTTPS).

System.InvalidOperationException

uri is null.

System.ArgumentException

uri is not accessible through the HTTP or HTTPS protocols.

System.InvalidOperationException

uri is null.

Remarks

This protected method is called by the .NET Framework SDK to make a synchronous request to an XML Web service. The Web Services Enhancements (WSE) has overridden the method to return a SoapWebRequest .

Remarks

This protected method is called by the .NET Framework to make a synchronous request to an XML Web service. The Web Services Enhancements (WSE) has overridden the method to return a SoapWebRequest .

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, and Windows 2000

Target Platforms

Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server, Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Longhorn, Pocket PC, Windows CE, Smart Phone

See Also

Reference

WebServicesClientProtocol Class
Microsoft.Web.Services2 Namespace

Other Resources

WebServicesClientProtocol Members