Export (0) Print
Expand All

ServiceDescriptionImporter.GenerateWebReferences Method

Compiles a collection of Web references to produce a client proxy or a server stub.

Namespace:  System.Web.Services.Description
Assembly:  System.Web.Services (in System.Web.Services.dll)

public static StringCollection GenerateWebReferences(
	WebReferenceCollection webReferences,
	CodeDomProvider codeProvider,
	CodeCompileUnit codeCompileUnit,
	WebReferenceOptions options
)

Parameters

webReferences
Type: System.Web.Services.Description.WebReferenceCollection

A WebReferenceCollection of Web references to compile.

codeProvider
Type: System.CodeDom.Compiler.CodeDomProvider

A CodeDomProvider that specifies the code provider.

codeCompileUnit
Type: System.CodeDom.CodeCompileUnit

A CodeCompileUnit that specifies the unit into which code is compiled.

options
Type: System.Web.Services.Description.WebReferenceOptions

A WebReferenceOptions that specifies code generation options.

Return Value

Type: System.Collections.Specialized.StringCollection
A StringCollection of compiler warnings.

The services description document collection in each WebReference member of the webReferences collection should contain only ServiceDescription and XmlSchema objects. This method is unable to interpret DiscoveryDocument objects.

If any of the XML Web service methods in the webReferences collection share custom parameter or return types, those types are also shared among the proxy methods generated. This is an important advantage over the situation in which each proxy is compiled separately, because in that case such types do not interoperate.

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft