This topic has not yet been rated - Rate this topic

XmlSchemaImporter Class

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Generates internal mappings to .NET Framework types for XML schema element declarations, including literal XSD message parts in a WSDL document.

System.Object
  System.Xml.Serialization.SchemaImporter
    System.Xml.Serialization.XmlSchemaImporter

Namespace:  System.Xml.Serialization
Assembly:  System.Xml (in System.Xml.dll)
public class XmlSchemaImporter : SchemaImporter

The XmlSchemaImporter type exposes the following members.

  Name Description
Public method XmlSchemaImporter(XmlSchemas) Initializes a new instance of the XmlSchemaImporter class, taking a collection of XmlSchema objects representing the XML schemas used by SOAP literal messages defined in a WSDL document.
Public method XmlSchemaImporter(XmlSchemas, CodeIdentifiers) Initializes a new instance of the XmlSchemaImporter class, taking a collection of XmlSchema objects that represents the XML schemas used by SOAP literal messages, plus classes being generated for bindings defined in a Web Services Description Language (WSDL) document.
Public method XmlSchemaImporter(XmlSchemas, CodeGenerationOptions, ImportContext) Initializes a new instance of the XmlSchemaImporter class for a collection of XML schemas, using the specified code generation options and import context.
Public method XmlSchemaImporter(XmlSchemas, CodeIdentifiers, CodeGenerationOptions) Initializes a new instance of the XmlSchemaImporter class, taking a collection of XmlSchema objects that represents the XML schemas used by SOAP literal messages, plus classes being generated for bindings defined in a WSDL document, and a CodeGenerationOptions enumeration value.
Public method XmlSchemaImporter(XmlSchemas, CodeGenerationOptions, CodeDomProvider, ImportContext) Initializes a new instance of the XmlSchemaImporter class.
Top
  Name Description
Public property Extensions Gets a collection of schema importer extensions. (Inherited from SchemaImporter.)
Top
  Name Description
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method ImportAnyType Generates internal type mapping information for a single, (SOAP) literal element part defined in a WSDL document.
Public method ImportDerivedTypeMapping(XmlQualifiedName, Type) Generates internal type mapping information for an element defined in an XML schema document.
Public method ImportDerivedTypeMapping(XmlQualifiedName, Type, Boolean) Generates internal type mapping information for an element defined in an XML schema document or as a part in a WSDL document.
Public method ImportMembersMapping(XmlQualifiedName) Generates internal type mapping information for a single element part of a literal-use SOAP message defined in a WSDL document.
Public method ImportMembersMapping(XmlQualifiedName[]) Generates internal type mapping information for the element parts of a literal-use SOAP message defined in a WSDL document.
Public method ImportMembersMapping(String, String, SoapSchemaMember[]) Generates internal type mapping information for the element parts of a literal-use SOAP message defined in a WSDL document.
Public method ImportMembersMapping(XmlQualifiedName[], Type, Boolean) Generates internal type mapping information for the element parts of a literal-use SOAP message defined in a WSDL document.
Public method ImportSchemaType(XmlQualifiedName) Generates internal type mapping information for an element defined in an XML schema document.
Public method ImportSchemaType(XmlQualifiedName, Type) Generates internal type mapping information for an element defined in an XML schema document.
Public method ImportSchemaType(XmlQualifiedName, Type, Boolean) Generates internal type mapping information for an element defined in an XML schema document.
Public method ImportTypeMapping Generates internal type mapping information for an element defined in an XML schema document.
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Top

The XmlSchemaImporter class is used by the Web Services Description Language Tool (Wsdl.exe) and the ServiceDescriptionImporter class while generating client proxy classes or abstract server classes from a Web Services Description Language (WSDL) document. The class is also used by the Web Services Description Language Tool (Wsdl.exe) while generating classes from XML Schema Definition (XSD) documents. Instead of using this class directly, use Wsdl.exe or Xsd.exe.

The XmlSchemaImporter class has methods to generate internal mappings to .NET Framework types for elements defined in an XSD document or as parts in a WSDL document. The following list shows when the class is used by Wsdl.exe:

  • A WSDL document specifies literal use, where the content of SOAP message parameters and return values (or request and response documents) is literally specified with XML schema definitions.

  • A WSDL document specifies the .NET Framework's non-SOAP implementations of Web services via the HTTP-GET and HTTP-POST operations.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ