共用方式為


<interopXmlType> Element

Creates a bidirectional map between a common language runtime type and an XML type and XML namespace. You use this element when a type is specified with the xsi:type attribute in SOAP.

<configuration>
   <system.runtime.remoting>
      <application>
         <soapInterop>
            <interopXmlType>

<interopXmlType 
   clr="FullTypeName, AssemblyName" 
   xml="XmlType, XmlNamespace"
/>

Required Attributes

Attribute Description
clr Specifies the full type name and assembly name of the type for which you want to create mapping to an XML type and XML namespace. This includes version, culture, and public key information if the containing assembly is in the global assembly cache.
xml Specifies the XML type name and the XML type namespace for which you want to create a mapping to a type and assembly.

Example

The following example associates the element ElementName and the XML namespace Example:mynamespace with the .NET type TypeName implemented by the AssemblyName assembly. The same is true of the XML type and namespace.

<configuration>
   <system.runtime.remoting>
      <application name="soapInterop">
         <soapInterop>
            <interopXmlElement 
               xml="ElementName,Example:mynamespace"
                clr="TypeName,AssemblyName"
            />
            <interopXmlType  
               xml="XmlTypeName,Example:TypeNamespace" 
               clr="TypeName,AssemblyName"
            />
         </soapInterop>
      </application>
   </system.runtime.remoting>
</configuration>

Requirements

Configuration Files: Application configuration file, machine configuration file (Machine.config)

See Also

Remoting Settings Schema