SoapServices.GetInteropTypeFromXmlElement(String, String) Method

Definition

Retrieves the Type that should be used during deserialization of an unrecognized object type with the given XML element name and namespace.

public:
 static Type ^ GetInteropTypeFromXmlElement(System::String ^ xmlElement, System::String ^ xmlNamespace);
public static Type GetInteropTypeFromXmlElement (string xmlElement, string xmlNamespace);
[System.Security.SecurityCritical]
public static Type GetInteropTypeFromXmlElement (string xmlElement, string xmlNamespace);
static member GetInteropTypeFromXmlElement : string * string -> Type
[<System.Security.SecurityCritical>]
static member GetInteropTypeFromXmlElement : string * string -> Type
Public Shared Function GetInteropTypeFromXmlElement (xmlElement As String, xmlNamespace As String) As Type

Parameters

xmlElement
String

The XML element name of the unknown object type.

xmlNamespace
String

The XML namespace of the unknown object type.

Returns

The Type of object associated with the specified XML element name and namespace.

Attributes

Exceptions

The immediate caller does not have infrastructure permission.

Examples

The following code example shows how to use this method. This code example is part of a larger example provided for the SoapServices class.

String^ interopTypeXmlElementName = L"ExampleClassElementName";
String^ interopTypeXmlNamespace = L"http://example.org/ExampleXmlNamespace";
Type^ interopType = SoapServices::GetInteropTypeFromXmlElement(
   interopTypeXmlElementName, interopTypeXmlNamespace );
Console::WriteLine( L"The interop type is {0}.", interopType );
String^ interopTypeXmlTypeName = L"ExampleXmlTypeName";
String^ interopTypeXmlTypeNamespace =
   L"http://example.org/ExampleXmlTypeNamespace";
interopType = SoapServices::GetInteropTypeFromXmlType(
   interopTypeXmlTypeName,interopTypeXmlTypeNamespace );
Console::WriteLine( L"The interop type is {0}.", interopType );
string interopTypeXmlElementName = 
    "ExampleClassElementName";
string interopTypeXmlNamespace = 
    "http://example.org/ExampleXmlNamespace";
Type interopType = SoapServices.GetInteropTypeFromXmlElement(
    interopTypeXmlElementName, 
    interopTypeXmlNamespace);
Console.WriteLine("The interop type is {0}.", interopType);

string interopTypeXmlTypeName = 
    "ExampleXmlTypeName";
string interopTypeXmlTypeNamespace = 
    "http://example.org/ExampleXmlTypeNamespace";
interopType = SoapServices.GetInteropTypeFromXmlType(
    interopTypeXmlTypeName, interopTypeXmlTypeNamespace);
Console.WriteLine("The interop type is {0}.", interopType);

Remarks

The current method returns values set up through RegisterInteropXmlElement and PreLoad.

Applies to