From RAD Studio API Documentation
Jump to: navigation, search


procedure RegisterInterface(Info: PTypeInfo; const Namespace: InvString = ''; const WSDLEncoding: InvString = ''; const Doc: string = ''; const ExtName: InvString = '');


void __fastcall RegisterInterface(System::Typinfo::PTypeInfo Info, const InvString Namespace = System::UnicodeString(), const InvString WSDLEncoding = System::UnicodeString(), const System::UnicodeString Doc = System::UnicodeString(), const InvString ExtName = System::UnicodeString());


Type Visibility Source Unit Parent
Soap.InvokeRegistry TInvokableClassRegistry


Registers an invokable interface.

Call RegisterInterface to register an invokable interface with the invocation registry. Typically, the call to RegisterInterface is added by the WSDL importer or Web Service wizard. In Delphi, this call goes in the initialization section of the unit that defines the invokable interface. In C++, it is called within a RegTypes method that uses the pragma startup directive.

Once the invokable interface is registered, client applications can statically bind to it using THTTPRio. On the server side, you must also register the implementation class (using the RegisterInvokableClass method) before the server can respond to incoming SOAP requests.

PInfo is a pointer to the type information for the interface. You can obtain the type information from an invokable interface by calling the TypeInfo function (Delphi) or __delphirtti (C++).

Namespace specifies a namespace URI that uniquely identifies the interface. If Namespace is set to an empty string, RegisterInterface automatically generates a unique string to use as a namespace URI. Note that RegisterInterface generates a SOAP Action header to use based on the Namespace of the interface. You can change this SOAP Action header using the RegisterDefaultSOAPAction method.

WSDLEncoding specifies a encoding attribute that appears on the xml header of any WSDL document that includes the definition of this interface (or rather, the port type to which it corresponds). The encoding attribute describes the character set to use in the WSDL document.

Doc is a descriptive string that describes the purpose or use of the interface. It is used if the application publishes a WSDL document that defines this interface.

ExtName is the name of the port type that corresponds to this interface in a WSDL document. This can be an empty string if the port type and interface have the same name. It is useful when a port type in a WSDL document has a name that is not a valid Object Pascal identifier (for example, a keyword).

DefSOAPAction is the SOAP Action header that should be used for messages that represent calls to the methods on this interface. If you do not supply a default SOAP Action header, your application uses an automatically-generated header that is based on the namespace of the interface.

See Also