ServiceDescriptionImporter Class


Exposes a means of generating client proxy classes for XML Web services.

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


[<PermissionSetAttribute(SecurityAction.InheritanceDemand, Name = "FullTrust")>]
[<PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")>]
type ServiceDescriptionImporter = class end


Initializes a new instance of the ServiceDescriptionImporter class.


Gets or sets various options for code generation.


Gets or sets the code generator used by the service description importer.


Gets or sets the protocol used to access the described XML Web services.


Gets the XmlSchemas used by the ServiceDescriptions property.


Gets the collection of ServiceDescription instances to be imported.


Gets or sets a value that determines the style of code (client or server) that is generated when the ServiceDescriptions values are imported.

System_CAPS_pubmethodAddServiceDescription(ServiceDescription, String, String)

Adds the specified ServiceDescription to the collection of ServiceDescriptions values to be imported.


Determines whether the specified object is equal to the current object.(Inherited from Object.)


Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticGenerateWebReferences(WebReferenceCollection, CodeDomProvider, CodeCompileUnit, WebReferenceOptions)

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


Serves as the default hash function. (Inherited from Object.)


Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodImport(CodeNamespace, CodeCompileUnit)

Imports the specified ServiceDescriptions values, that generates code as specified by the Style property.


Creates a shallow copy of the current Object.(Inherited from Object.)


Returns a string that represents the current object.(Inherited from Object.)

The interface to an XML Web service is typically described by a Web Services Description Language (WSDL) file. For example, to obtain a WSDL description of a Web service using ASP.NET exposed at http://localhost/service.asmx, simply navigate to http://localhost/service.asmx?WSDL.

The ServiceDescriptionImporter class allows you to easily import the information contained in a WSDL description into a System.CodeDom.CodeCompileUnit object. By adjusting the value of the Style parameter, you can instruct a ServiceDescriptionImporter instance either to generate a client proxy class that provides the functionality of the Web service by transparently calling it or to generate an abstract class that encapsulates the functionality of the Web service without implementing it.

The code in the resulting CodeCompileUnit object can then either be called directly or exported in the language of your choice.

The following example illustrates the use of the ServiceDescriptionImporter class to generate proxy client code that calls an XML Web service described by a WSDL file.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1

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

Return to top