Edit

Share via


SoapServices.GetInteropTypeFromXmlType(String, String) Method

Definition

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

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

Parameters

xmlType
String

The XML type of the unknown object type.

xmlTypeNamespace
String

The XML type namespace of the unknown object type.

Returns

The Type of object associated with the specified XML type 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 RegisterInteropXmlType and PreLoad.

Applies to