Soap.InvokeRegistry.TSOAPHeader

From RAD Studio API Documentation
Jump to: navigation, search

Soap.InvokeRegistry.TRemotableSystem.TObjectTSOAPHeader

Delphi

TSOAPHeader = class(TRemotable)

C++

class PASCALIMPLEMENTATION TSOAPHeader : public TRemotable

Properties

Type Visibility Source Unit Parent
class public
Soap.InvokeRegistry.pas
Soap.InvokeRegistry.hpp
Soap.InvokeRegistry Soap.InvokeRegistry

Description

TSOAPHeader represents a header on the SOAP envelope that contains an encoded message in a Web Service application.

TSOAPHeader is the base class for classes that represent SOAP headers. Each type of header has an associated TSOAPHeader descendant, which is registered with the remotable type registry. Register a TSOAPHeader descendant like any other remotable type, using the name of the header as the type name. If you import a WSDL document, the code to define and register the TSOAPHeader descendant is generated automtically.

You can also register the TSOAPHeader descendant with the invocation registry. The invocation registry's RegisterHeaderClass method associates the header class and the invokable interfaces with which it should be included. Registering the header with the invocation registry serves two purposes:

When a server publishes WSDL information about the Web Service, information about the header type is included in the resulting WSDL document.

On both servers and clients, the invocation registry associates the header class with a header name and a namespace in which that name is defined. This is important if the namespace for the header type is different than the namespace for the invokable interface that uses the header.

A SOAP header is a special remotable type that represents a node in the header section of a SOAP envelope. As with any other remotable type, the published properties of the TSOAPHeader descendant correspond to the child nodes and attributes of the corresponding header node. TSOAPHeader introduces two properties for common attributes of SOAP headers: MustUnderstand and Actor. Typically, SOAP headers represent information that is associated with an entire invokable interface (port type) rather than just the method that is the focus of a single message.

When an application receives a SOAP message (that is, when a server receives a request to execute a method on an invokable interface or when a client receives a response after sending such a request), the headers on that message are automatically converted to the corresponding TSOAPHeader descendants that are registered with the remotable type registry. You can access these TSOAPHeader descendants using the ISOAPHeaders interface, which can be obtained from the implementation class of the invokable interface or from the invokable interface of a remote interfaced object.

When an application sends a SOAP message (either a client sending a request or a server sending a response), supply the headers that should appear on that outgoing message by creating TSOAPHeader descendants and calling the Send method of an ISOAPHeaders interface.

See Also