Soap.InvokeRegistry.TInvokableClassRegistry.RegisterHeaderClass

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure RegisterHeaderClass(Info: PTypeInfo; AClass: TClass;
const HeaderName: InvString; const HeaderNamespace: InvString;
DefaultMethodType: eHeaderMethodType = hmtAll;
Required: Boolean = False); overload;
procedure RegisterHeaderClass(Info: PTypeInfo; AClass: TClass;
DefaultMethodType: eHeaderMethodType = hmtAll;
Required: Boolean = False); overload;

C++

void __fastcall RegisterHeaderClass(System::Typinfo::PTypeInfo Info, System::TClass AClass, const InvString HeaderName, const InvString HeaderNamespace, eHeaderMethodType DefaultMethodType = (eHeaderMethodType)(0x0), bool Required = false)/* overload */;
void __fastcall RegisterHeaderClass(System::Typinfo::PTypeInfo Info, System::TClass AClass, eHeaderMethodType DefaultMethodType = (eHeaderMethodType)(0x0), bool Required = false)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
public
Soap.InvokeRegistry.pas
Soap.InvokeRegistry.hpp
Soap.InvokeRegistry TInvokableClassRegistry

Description

Registers a class that represents a headers which accompanies calls to an invokable interface.

Use RegisterHeaderClass to register a TSOAPHeader descendant. Registering a TSOAPHeader descendant serves two purposes:

On servers, when a TSOAPHeader descendant is registered, its definition is exported to WSDL documents so that applications using that WSDL document can recognize and process the header.

On both servers and clients, registering associates the TSOAPHeader descendant with a header name and the namespace in which that name is defined.

Info points to the type information of the invokable interface that the header should accompany. If the header should be included in messages invoking more than one interface or in the responses to more than one interface, you must call this method once for each interface type.

AClass describes the TSOAPHeader descendant that represents the header.

HeaderName is the name of the header, as defined within the header's namespace. If HeaderName is not supplied, the header's name is assumed to be the same as the type name under which it is registered in the remotable type registry.

HeaderNamespace is the URI for the namespace in which the header's name is defined. If HeaderName and HeaderNamespace are not supplied, the header is assumed to be defined in the same namespace as the interface with which it is associated.

DefaultMethodType indicates whether the header is to be used on request messages, response messages, or both. This default value is associated with the interface as a whole. It can be changed for individual methods of the interface by subsequent calls to the RegisterHeaderMethod method.

Required indicates whether the header must be included in messages about the interface. When Required is true, the header must be included and understood by the recipient of the message. When Required is false, the header is optional. Note that if the header is required by some but not all messages, you must set this Required parameter to false, and then add the requirement to individual methods by subsequent calls to the RegisterHeaderMethod method.

Note: After a call to RegisterHeaderClass, the header class is registered so that it is associated with all methods of the specified interface. If only a subset of the interface's methods use the header, or if the header should have a different method type for some of the methods on the interface, or if the header is required by a subset of the methods on the interface, you can indicate this by calling the RegisterHeaderMethod method for each method that the header accompanies.

See Also