From RAD Studio API Documentation
Jump to: navigation, search


procedure RegisterXSClass(AClass: TClass; const URI: InvString = ''; const Name: InvString = '';  const ExtName: InvString = ''; IsScalar: Boolean = False; MultiRefOpt: TObjMultiOptions = ocDefault);


void __fastcall RegisterXSClass(System::TClass AClass, const System::UnicodeString URI = System::UnicodeString(), const System::UnicodeString Name = System::UnicodeString(), const System::UnicodeString ExtName = System::UnicodeString(), bool IsScalar = false, TObjMultiOptions MultiRefOpt = (TObjMultiOptions)(0x0));


Type Visibility Source Unit Parent
Soap.InvokeRegistry TRemotableTypeRegistry


Registers a remotable class.

Call RegisterXSClass to register a remotable class so that it can be communicated between client applications and a Web Service provider. All remotable classes are compiled with runtime type information (RTTI) and have a virtual constructor that the remotable type registry recognizes and uses to supply class instances.

When the remotable class is a TRemotable descendant, it can be used to represent non-scalar types for parameters and return values on an invokable interface. When it is an ERemotableException descendant, it allows the Web Service application to send clients a fault packet that includes all the published properties of the exception class.

AClass is the class reference for the remotable class. In Delphi, you specify this in code using the class name. In C++, you can obtain this class reference for a class using the __classid keyword.

URI is the namespace URI to associate with that class. This should uniquely identify the class. If you omit this parameter (or supply an empty string), RegisterXSClass generates a namespace URI for you, based on the name of the class, the name of the unit in which it is declared, and the value of the global AppNameSpacePrefix variable. Note that the namespace URI must be the same in both client and server applications. Thus, if you do not explicitly supply a namespace URI, the class must be declared in a unit with the same name, and the value of AppNameSpacePrefix must be the same in both applications.

Name is the name of a type that the class represents. This is used for the mapping between the class and its definition in a WSDL document.

ExtName is the same as Name.

IsScalar indicates whether the class represents a scalar type. Remotable classes that represent scalar types must implement the XSToNative and NativeToXS methods.

MultiRefOpt indicates how multiple references to the same instance of the class should be handled when converting them to their SOAP representation. For more information, see the ClassOptions method.

See Also