IROMessage

Overview

The IROMessage interface is used by the Remoting SDK to implement message processing in a Service oriented architecture.

All custom RemObjects Messages have to implement the IROMessage interface.

Messages are implemented to create and encode requests in a specific format, such as SOAP or BinMessage, as well as to decode the response. The ultimate responsibility of a class implementing IROMessage is to provide a stream that will be communicated to the server by a client channel.

Though custom message implementations typically inherit from a TROMessage descendant, any IROMessage implementation can be passed to a TROProxy. The IROMessage implementation should know how to process the method parameters it is subsequently passed.

Location

Implemented in

 

ApplyAttributes2

Sets SOAP attributes (SOAP message only)

procedure ApplyAttributes2

ApplyAttributes2_Transport

Sets transport related attributes (SOAP message only)

procedure ApplyAttributes2_Transport(aTransport: IROTransport)

Parameters:

  • aTransport: Transport channel

ClientID

Provides access to the ClientID read from the message. See event dispatching for a usage example.

property ClientID: TGUID read write

Finalize

Ensures that the message content is complete before sending it by performing all necessary final processing. This method is called after all parameters have been written to a message and before the message will be sent. It should perform all necessary wrap-up to ensure that a subsequent call to WriteToStream will produce a complete message.

procedure Finalize

FreeStream

Destroys stream

procedure FreeStream

GetEnvelopes

Envelopes collection.

function GetEnvelopes: TCollection

Initialize (IROTransport, string, string, string, TMessageType)  overload

Initializes the message with the given parameters.

procedure Initialize(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string; aType: TMessageType)

Parameters:

  • aTransport: IROTransport
  • aLibraryName: RODL file name
  • anInterfaceName: Interface name
  • aMessageName: Message name
  • aType: Message type

Initialize (IROTransport, string, string, TMessageType)  overload

Initializes the message with the given parameters.

procedure Initialize(const aTransport: IROTransport; const anInterfaceName: string; const aMessageName: string; aType: TMessageType)

Parameters:

  • aTransport: IROTransport
  • anInterfaceName: Interface name
  • aMessageName: Message name
  • aType: Message type

InitializeEventMessage

Initializes an Event message with the given parameters.

procedure InitializeEventMessage(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string)

Parameters:

  • aTransport: IROTransport
  • aLibraryName: RODL file name
  • anInterfaceName: Interface name
  • aMessageName: Message name

InitializeExceptionMessage

Initializes an Exception message with the given parameters.

procedure InitializeExceptionMessage(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string)

Parameters:

  • aTransport: IROTransport
  • aLibraryName: RODL file name
  • anInterfaceName: Interface name
  • aMessageName: Message name

InitializeRead

Performs additional initialization before reading.

procedure InitializeRead(const aTransport: IROTransport)

Parameters:


InitializeRequestMessage

Initializes a mtRequest message with the given parameters.

procedure InitializeRequestMessage(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string)

Parameters:

  • aTransport: IROTransport
  • aLibraryName: RODL file name
  • anInterfaceName: Interface name
  • aMessageName: Message name

InitializeResponseMessage

Initializes a mtResponse message with the given parameters.

procedure InitializeResponseMessage(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string)

Parameters:

  • aTransport: IROTransport
  • aLibraryName: RODL file name
  • anInterfaceName: Interface name
  • aMessageName: Message name

InterfaceName

Contains the name of the interface or service that is to be or was called on the server.

property InterfaceName: string read write

MaxEventsPerPoll

property MaxEventsPerPoll: integer read write

MessageName

Contains the name of the message (i.e. the method name) that is to be or was called on the server.

property MessageName: string read write

MessageType

Type of the message represented by the message instance.

property MessageType: TMessageType read write

Read

The general method to read any data.

procedure Read(const aName: string; aTypeInfo: PTypeInfo; var Ptr: ; ExtraAttributes: TParamAttributes)

Parameters:

  • aName: Name of the object to read.
  • aTypeInfo: Runtime type information for the data to read.
  • Ptr: Output parameter, should point to the deserialized instance.
  • ExtraAttributes: Set of TParamAttribute

ReadArray

Reads an array value.

function ReadArray(const aName: string; aClass: TClass; var Ref: ; ArrayElementId: integer): Boolean

Parameters:

  • aName: Name of the object to read.
  • aClass: Class of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadBinary

Reads a Binary value.

procedure ReadBinary(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDateTime

Reads a TDateTime value.

procedure ReadDateTime(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDecimal

Reads a Decimal value.

procedure ReadDecimal(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDouble

Reads a Double value.

procedure ReadDouble(const aName: string; aFloatType: TFloatType; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • aFloatType: Specifies the exact floating point type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadEnumerated

Reads an enumerated value.

procedure ReadEnumerated(const aName: string; anEnumTypeInfo: PTypeInfo; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • anEnumTypeInfo: Runtime type information for the enuymerated type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadFromStream (TStream)  overload

Reads the contents of the message from the given stream.

procedure ReadFromStream(aStream: TStream)

Parameters:

  • aStream: stream

ReadFromStream (TStream, Boolean)  overload

Reads the contents of the message from the given stream.

procedure ReadFromStream(aStream: TStream; var aFreeStream: Boolean)

Parameters:

  • aStream: stream
  • aFreeStream: free stream

ReadGuid

Reads a GUID value.

procedure ReadGuid(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadInt64

Reads a Int64 value.

procedure ReadInt64(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadInteger

Reads a Integer value (32 bits or less).

procedure ReadInteger(const aName: string; anOrdType: TOrdType; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • anOrdType: Specifies the exact integer point type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadLegacyString

Reads a legacy string (AnsiString or UTF8String) value.

procedure ReadLegacyString(const aName: string; var Ref: ; ExtraAttributes: TParamAttributes; ArrayElementId: integer; iMaxLength: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ExtraAttributes: specified what string should be read (AnsiString or UTF8String)
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • iMaxLength: Specifies the maximum string length to read, is set to -1 when no restriction is required.

ReadStruct

Reads a Struct value.

function ReadStruct(const aName: string; aClass: TClass; var Ref: ; ArrayElementId: integer): Boolean

Parameters:

  • aName: Name of the object to read.
  • aClass: Class of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadUnicodeString

Reads a WideString value.

procedure ReadUnicodeString(const aName: string; var Ref: ; ArrayElementId: integer; iMaxLength: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • iMaxLength: Specifies the maximum string length to read, is set to -1 when no restriction is required.

ReadVariant

Reads a Variant value.

procedure ReadVariant(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadXml

Reads a XML value.

procedure ReadXml(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

SetAttributes

Sets additional information.

procedure SetAttributes(aTransport: IROTransport; const aNames: array of string; const aValues: array of string)

Parameters:

  • aTransport: Transport channel
  • aNames:
  • aValues:

SetAutoGeneratedNamespaces

procedure SetAutoGeneratedNamespaces(aValue: string)

Parameters:

  • aValue:

SetDefaultNamespaces

procedure SetDefaultNamespaces(aValue: string)

Parameters:

  • aValue:

StoreAttributes2

stores SOAP attributes (SOAP message only)

procedure StoreAttributes2(const aNames: array of string; const aValues: array of string)

Parameters:

  • aNames:
  • aValues:

UnsetAttributes

Clears additional information.

procedure UnsetAttributes(aTransport: IROTransport)

Parameters:

  • aTransport: Transport channel

UnsetAttributes2

Clears additional information.

procedure UnsetAttributes2

UnsetAttributes2_Transport

Clears additional information.

procedure UnsetAttributes2_Transport(aTransport: IROTransport)

Parameters:

  • aTransport: Transport channel

Write

Writes the value of the aName parameter from Ptr with the given aTypeInfo and ExtraAttributes to the message.

procedure Write(const aName: string; aTypeInfo: PTypeInfo; const Ptr: ; ExtraAttributes: TParamAttributes)

Parameters:

  • aName: Name of the object to write.
  • aTypeInfo: RTI
  • Ptr: Pointer to the source variable
  • ExtraAttributes: set of TParamAttribute

WriteArray

Writes an array value.

procedure WriteArray(const aName: string; const Ref: ; aClass: TClass; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • aClass: Class of the object to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteBinary

Writes a Binary value.

procedure WriteBinary(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDateTime

Writes a TDateTime value.

procedure WriteDateTime(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDecimal

Writes a Decimal value.

procedure WriteDecimal(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDouble

Writes a Double value.

procedure WriteDouble(const aName: string; aFloatType: TFloatType; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • aFloatType: Specifies the exact floating point data type to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteEnumerated

Writes an enumerated value.

procedure WriteEnumerated(const aName: string; anEnumTypeInfo: PTypeInfo; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • anEnumTypeInfo: Runtime type information of the enumerated type.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteException

Writes an Exception value.

procedure WriteException(aStream: TStream; anException: Exception)

Parameters:


WriteGuid

Writes a GUID value.

procedure WriteGuid(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteInt64

Writes a Int64 value.

procedure WriteInt64(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteInteger

Writes a Integer value (32 bits or less).

procedure WriteInteger(const aName: string; anOrdType: TOrdType; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • anOrdType: Specifies the exact integer data type to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteLegacyString

Writes a legacy string (AnsiString or UTF8String) value.

procedure WriteLegacyString(const aName: string; const Ref: ; ExtraAttributes: TParamAttributes; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ExtraAttributes: specified what string should be written (AnsiString or UTF8String)
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteStruct

Writes a Struct value.

procedure WriteStruct(const aName: string; const Ref: ; aClass: TClass; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • aClass: Class of the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteToStream

Writes the content of the message to aStream.

procedure WriteToStream(aStream: TStream)

Parameters:

  • aStream: stream

WriteUnicodeString

Writes a WideString value.

procedure WriteUnicodeString(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteVariant

Writes a Variant value to the message.

procedure WriteVariant(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteXml

Writes a XML value.

procedure WriteXml(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

 

ClientID

Provides access to the ClientID read from the message. See event dispatching for a usage example.

property ClientID: TGUID read write

InterfaceName

Contains the name of the interface or service that is to be or was called on the server.

property InterfaceName: string read write

MaxEventsPerPoll

property MaxEventsPerPoll: integer read write

MessageName

Contains the name of the message (i.e. the method name) that is to be or was called on the server.

property MessageName: string read write

MessageType

Type of the message represented by the message instance.

property MessageType: TMessageType read write

 

ApplyAttributes2

Sets SOAP attributes (SOAP message only)

procedure ApplyAttributes2

ApplyAttributes2_Transport

Sets transport related attributes (SOAP message only)

procedure ApplyAttributes2_Transport(aTransport: IROTransport)

Parameters:

  • aTransport: Transport channel

Finalize

Ensures that the message content is complete before sending it by performing all necessary final processing. This method is called after all parameters have been written to a message and before the message will be sent. It should perform all necessary wrap-up to ensure that a subsequent call to WriteToStream will produce a complete message.

procedure Finalize

FreeStream

Destroys stream

procedure FreeStream

GetEnvelopes

Envelopes collection.

function GetEnvelopes: TCollection

Initialize (IROTransport, string, string, string, TMessageType)  overload

Initializes the message with the given parameters.

procedure Initialize(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string; aType: TMessageType)

Parameters:

  • aTransport: IROTransport
  • aLibraryName: RODL file name
  • anInterfaceName: Interface name
  • aMessageName: Message name
  • aType: Message type

Initialize (IROTransport, string, string, TMessageType)  overload

Initializes the message with the given parameters.

procedure Initialize(const aTransport: IROTransport; const anInterfaceName: string; const aMessageName: string; aType: TMessageType)

Parameters:

  • aTransport: IROTransport
  • anInterfaceName: Interface name
  • aMessageName: Message name
  • aType: Message type

InitializeEventMessage

Initializes an Event message with the given parameters.

procedure InitializeEventMessage(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string)

Parameters:

  • aTransport: IROTransport
  • aLibraryName: RODL file name
  • anInterfaceName: Interface name
  • aMessageName: Message name

InitializeExceptionMessage

Initializes an Exception message with the given parameters.

procedure InitializeExceptionMessage(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string)

Parameters:

  • aTransport: IROTransport
  • aLibraryName: RODL file name
  • anInterfaceName: Interface name
  • aMessageName: Message name

InitializeRead

Performs additional initialization before reading.

procedure InitializeRead(const aTransport: IROTransport)

Parameters:


InitializeRequestMessage

Initializes a mtRequest message with the given parameters.

procedure InitializeRequestMessage(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string)

Parameters:

  • aTransport: IROTransport
  • aLibraryName: RODL file name
  • anInterfaceName: Interface name
  • aMessageName: Message name

InitializeResponseMessage

Initializes a mtResponse message with the given parameters.

procedure InitializeResponseMessage(const aTransport: IROTransport; const aLibraryName: string; const anInterfaceName: string; const aMessageName: string)

Parameters:

  • aTransport: IROTransport
  • aLibraryName: RODL file name
  • anInterfaceName: Interface name
  • aMessageName: Message name

Read

The general method to read any data.

procedure Read(const aName: string; aTypeInfo: PTypeInfo; var Ptr: ; ExtraAttributes: TParamAttributes)

Parameters:

  • aName: Name of the object to read.
  • aTypeInfo: Runtime type information for the data to read.
  • Ptr: Output parameter, should point to the deserialized instance.
  • ExtraAttributes: Set of TParamAttribute

ReadArray

Reads an array value.

function ReadArray(const aName: string; aClass: TClass; var Ref: ; ArrayElementId: integer): Boolean

Parameters:

  • aName: Name of the object to read.
  • aClass: Class of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadBinary

Reads a Binary value.

procedure ReadBinary(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDateTime

Reads a TDateTime value.

procedure ReadDateTime(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDecimal

Reads a Decimal value.

procedure ReadDecimal(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadDouble

Reads a Double value.

procedure ReadDouble(const aName: string; aFloatType: TFloatType; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • aFloatType: Specifies the exact floating point type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadEnumerated

Reads an enumerated value.

procedure ReadEnumerated(const aName: string; anEnumTypeInfo: PTypeInfo; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • anEnumTypeInfo: Runtime type information for the enuymerated type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadFromStream (TStream)  overload

Reads the contents of the message from the given stream.

procedure ReadFromStream(aStream: TStream)

Parameters:

  • aStream: stream

ReadFromStream (TStream, Boolean)  overload

Reads the contents of the message from the given stream.

procedure ReadFromStream(aStream: TStream; var aFreeStream: Boolean)

Parameters:

  • aStream: stream
  • aFreeStream: free stream

ReadGuid

Reads a GUID value.

procedure ReadGuid(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadInt64

Reads a Int64 value.

procedure ReadInt64(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadInteger

Reads a Integer value (32 bits or less).

procedure ReadInteger(const aName: string; anOrdType: TOrdType; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • anOrdType: Specifies the exact integer point type to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadLegacyString

Reads a legacy string (AnsiString or UTF8String) value.

procedure ReadLegacyString(const aName: string; var Ref: ; ExtraAttributes: TParamAttributes; ArrayElementId: integer; iMaxLength: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ExtraAttributes: specified what string should be read (AnsiString or UTF8String)
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • iMaxLength: Specifies the maximum string length to read, is set to -1 when no restriction is required.

ReadStruct

Reads a Struct value.

function ReadStruct(const aName: string; aClass: TClass; var Ref: ; ArrayElementId: integer): Boolean

Parameters:

  • aName: Name of the object to read.
  • aClass: Class of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadUnicodeString

Reads a WideString value.

procedure ReadUnicodeString(const aName: string; var Ref: ; ArrayElementId: integer; iMaxLength: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.
  • iMaxLength: Specifies the maximum string length to read, is set to -1 when no restriction is required.

ReadVariant

Reads a Variant value.

procedure ReadVariant(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

ReadXml

Reads a XML value.

procedure ReadXml(const aName: string; var Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to read.
  • Ref: Output parameter, should point to the deserialized instance.
  • ArrayElementId: If the object about to be read is an array element, its index is contained in this parameter, otherwise it is -1.

SetAttributes

Sets additional information.

procedure SetAttributes(aTransport: IROTransport; const aNames: array of string; const aValues: array of string)

Parameters:

  • aTransport: Transport channel
  • aNames:
  • aValues:

SetAutoGeneratedNamespaces

procedure SetAutoGeneratedNamespaces(aValue: string)

Parameters:

  • aValue:

SetDefaultNamespaces

procedure SetDefaultNamespaces(aValue: string)

Parameters:

  • aValue:

StoreAttributes2

stores SOAP attributes (SOAP message only)

procedure StoreAttributes2(const aNames: array of string; const aValues: array of string)

Parameters:

  • aNames:
  • aValues:

UnsetAttributes

Clears additional information.

procedure UnsetAttributes(aTransport: IROTransport)

Parameters:

  • aTransport: Transport channel

UnsetAttributes2

Clears additional information.

procedure UnsetAttributes2

UnsetAttributes2_Transport

Clears additional information.

procedure UnsetAttributes2_Transport(aTransport: IROTransport)

Parameters:

  • aTransport: Transport channel

Write

Writes the value of the aName parameter from Ptr with the given aTypeInfo and ExtraAttributes to the message.

procedure Write(const aName: string; aTypeInfo: PTypeInfo; const Ptr: ; ExtraAttributes: TParamAttributes)

Parameters:

  • aName: Name of the object to write.
  • aTypeInfo: RTI
  • Ptr: Pointer to the source variable
  • ExtraAttributes: set of TParamAttribute

WriteArray

Writes an array value.

procedure WriteArray(const aName: string; const Ref: ; aClass: TClass; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • aClass: Class of the object to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteBinary

Writes a Binary value.

procedure WriteBinary(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDateTime

Writes a TDateTime value.

procedure WriteDateTime(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDecimal

Writes a Decimal value.

procedure WriteDecimal(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteDouble

Writes a Double value.

procedure WriteDouble(const aName: string; aFloatType: TFloatType; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • aFloatType: Specifies the exact floating point data type to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteEnumerated

Writes an enumerated value.

procedure WriteEnumerated(const aName: string; anEnumTypeInfo: PTypeInfo; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • anEnumTypeInfo: Runtime type information of the enumerated type.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteException

Writes an Exception value.

procedure WriteException(aStream: TStream; anException: Exception)

Parameters:


WriteGuid

Writes a GUID value.

procedure WriteGuid(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteInt64

Writes a Int64 value.

procedure WriteInt64(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteInteger

Writes a Integer value (32 bits or less).

procedure WriteInteger(const aName: string; anOrdType: TOrdType; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • anOrdType: Specifies the exact integer data type to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteLegacyString

Writes a legacy string (AnsiString or UTF8String) value.

procedure WriteLegacyString(const aName: string; const Ref: ; ExtraAttributes: TParamAttributes; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ExtraAttributes: specified what string should be written (AnsiString or UTF8String)
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteStruct

Writes a Struct value.

procedure WriteStruct(const aName: string; const Ref: ; aClass: TClass; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • aClass: Class of the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteToStream

Writes the content of the message to aStream.

procedure WriteToStream(aStream: TStream)

Parameters:

  • aStream: stream

WriteUnicodeString

Writes a WideString value.

procedure WriteUnicodeString(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteVariant

Writes a Variant value to the message.

procedure WriteVariant(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

WriteXml

Writes a XML value.

procedure WriteXml(const aName: string; const Ref: ; ArrayElementId: integer)

Parameters:

  • aName: Name of the object to write.
  • Ref: Points to the instance to serialize.
  • ArrayElementId: If the object to write is an array element, its index is contained in this parameter, otherwise it is -1.

Descendants

See Also