Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
 GenerateWebReferences Method

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
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)
Visual Basic (Declaration)
Public Shared Function GenerateWebReferences ( _
    webReferences As WebReferenceCollection, _
    codeProvider As CodeDomProvider, _
    codeCompileUnit As CodeCompileUnit, _
    options As WebReferenceOptions _
) As StringCollection
Visual Basic (Usage)
Dim webReferences As WebReferenceCollection
Dim codeProvider As CodeDomProvider
Dim codeCompileUnit As CodeCompileUnit
Dim options As WebReferenceOptions
Dim returnValue As StringCollection

returnValue = ServiceDescriptionImporter.GenerateWebReferences(webReferences, _
    codeProvider, codeCompileUnit, options)
C#
public static StringCollection GenerateWebReferences(
    WebReferenceCollection webReferences,
    CodeDomProvider codeProvider,
    CodeCompileUnit codeCompileUnit,
    WebReferenceOptions options
)
Visual C++
public:
static StringCollection^ GenerateWebReferences(
    WebReferenceCollection^ webReferences, 
    CodeDomProvider^ codeProvider, 
    CodeCompileUnit^ codeCompileUnit, 
    WebReferenceOptions^ options
)
JScript
public static function GenerateWebReferences(
    webReferences : WebReferenceCollection, 
    codeProvider : CodeDomProvider, 
    codeCompileUnit : CodeCompileUnit, 
    options : WebReferenceOptions
) : StringCollection

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.

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.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

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

.NET Framework

Supported in: 3.5, 3.0, 2.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker