202 lines
11 KiB
ObjectPascal
202 lines
11 KiB
ObjectPascal
unit uRORes;
|
|
|
|
{----------------------------------------------------------------------------}
|
|
{ RemObjects SDK Library - Core Library }
|
|
{ }
|
|
{ compiler: Delphi 5 and up, Kylix 2 and up }
|
|
{ platform: Win32, Linux }
|
|
{ }
|
|
{ (c)opyright RemObjects Software. all rights reserved. }
|
|
{ }
|
|
{ Using this code requires a valid license of the RemObjects SDK }
|
|
{ which can be obtained at http://www.remobjects.com. }
|
|
{----------------------------------------------------------------------------}
|
|
|
|
{$I RemObjects.inc}
|
|
|
|
interface
|
|
|
|
uses
|
|
{$IFDEF REMOBJECTS_TRIAL}uROTrial,{$ENDIF}
|
|
{$IFDEF DOTNET}
|
|
Borland.Delphi.SysUtils;
|
|
{$ELSE}
|
|
Classes, SysUtils;
|
|
{$ENDIF DOTNET}
|
|
|
|
{$IFDEF DOTNET}
|
|
type TSessionID = string;
|
|
{$ELSE}
|
|
type TSessionID = TGUID;
|
|
{$ENDIF DOTNET}
|
|
|
|
const
|
|
str_Author = 'RemObjects Software';
|
|
str_ProductName = 'RemObjects SDK';
|
|
|
|
res_RODLFile = 'RODLFILE';
|
|
|
|
CRLF = #13#10;
|
|
|
|
HTTPModuleInfoCommand = '/Info';
|
|
|
|
resourcestring
|
|
// RODL
|
|
err_InvalidIndex = 'Invalid index %d'; // Raised by the RODL classes to indicate an invalid entity index
|
|
err_InvalidType = 'Invalid type "%s. Expected "%s""'; // Raised by TRODLComplexEntity.Add when trying to add an invalid class to the internal list
|
|
err_InvalidLibrary = 'Invalid library'; // Raised by TRODLConverter.Convert when the library is NIL
|
|
err_InvalidStream = 'Invalid stream'; // Raised by TRODLReader.Read when a NIL stream is passed
|
|
err_InvalidTargetEntity = 'Invalid TargetEntity "%s"'; // Raised by TRODLConverter.Convert when a call to ValidateTargetEntity fails
|
|
err_InvalidParamFlag = 'Invalid Parameter Flag "%s"'; // Raised by XMLFlagNameToFlag (unit uRODLToXML) when the specified string is not in XMLFlagNames
|
|
|
|
err_InvalidStringLength = 'Stream read error: Invalid string length "%d"'; //
|
|
err_InvalidBinaryLength = 'Stream read error: Invalid binary length "%d"'; //
|
|
str_InvalidClassTypeInStream = 'Stream read error: Invalid class type encountered: "%s"';
|
|
err_ObjectExpectedInStream = 'Stream read error: Object expected, but nil found.';
|
|
err_UnexpectedEndOfStream = 'Unexpected end of stream.';
|
|
|
|
err_MessageClassMustImplementAssign = 'Please implement Assign() for your custom message class.';
|
|
|
|
err_InvalidInfo = 'Invalid or incomplete info.'; // Raised by TRODLEntity.Validate when the internal Info property is not valid
|
|
err_RodlDuplicateName = 'Duplicate name.'; // Raised by TRODLComplexEntity.Validate when two items have the same name
|
|
err_RodlNoDataTypeSpecified = 'No data type specified.'; // Raised by TRODLComplexEntity.Validate when two items have the same name
|
|
err_RodlNoEnumValues = 'Enum does not contain any values.';
|
|
err_RodlNoStructElementsDefined = 'Struct does not contain any elements.';
|
|
err_RodlNoOperationsDefined = 'Service interface does not contain any elements.';
|
|
err_RodlUsedFileDoesNotExist = 'The referenced RODL file "%s" could not be found.';
|
|
err_RodlInvalidDataType = 'Invalid or undefined data type "%s".';
|
|
err_RodlStructCannotBeNested = 'Structs cannot recursively contain themselves.';
|
|
err_RodlInvalidAncestorType = 'Invalid or undefined ancestor type "%s".';
|
|
|
|
err_UnspecifiedRODLLocation = 'Unspecified RODL location';
|
|
|
|
str_ExceptionOnServer = 'An exception of type %s was raised on the server: %s';
|
|
str_ExceptionReraisedFromServer = 'An exception was raised on the server: %s';
|
|
|
|
err_AssignError = 'Cannot assign a "%s" to a "%s".';
|
|
|
|
// Message handling
|
|
err_InvalidRequestStream = 'Invalid request stream (%d bytes)';
|
|
err_NILMessage = 'Message is NIL'; // Raised server side when a message passed to ProcessMessage is NIL
|
|
err_UnspecifiedInterface = 'The message does not have an interface name'; // Raised server side when a message passed to ProcessMessage does not have a valid InterfaceName
|
|
err_UnspecifiedMessage = 'The message does not have a name'; // Raised server side when a message passed to ProcessMessage does not have a valid MessageName
|
|
err_UnknownMethod = 'Unknown method %s for interface %s'; // Raised server side when a server interface does not have a method matching the message name
|
|
err_ClassFactoryDidNotReturnInstance = 'Class factory did not return an instance of "%s"'; // Raised server side when a class factory returns a NIL reference. It should never happen
|
|
err_ParameterNotFound = 'Parameter "%s" was not found';
|
|
|
|
// Misc
|
|
err_NotImplemented = 'Not implemented'; // Not implemented error. Should never be happen
|
|
err_TypeNotSupported = 'Type "%s" not supported'; // Raised by message classes when the typeinfo of the parameter being read/written is not supported
|
|
err_ClassFactoryNotFound = 'Class factory for interface %s not found';
|
|
err_UnspecifiedTargetURL = 'Unspecified TargetURL';
|
|
err_IROMessageNotSupported = 'Class "%s" does not support IROMessage';
|
|
err_ClassAlreadyRegistered = 'Class "%s" is already registered';
|
|
err_UnknownClass = 'Unknown class "%s"';
|
|
err_UnknownProxyInterface = 'Unknown proxy interface "%s"';
|
|
err_UnknownTransportChannelClass = 'Unknown transport channel class "%s"';
|
|
err_UnknownMessageClass = 'Unknown message class "%s"';
|
|
|
|
err_DispatcherAlreadyAssigned = 'Dispatcher for %s already assigned';
|
|
err_CannotFindMessageDispatcher = 'Cannot find message dispatcher. Maybe there is no message component configured for the requested path?';
|
|
err_ServerOnlySupportsOneDispatcher = '%s servers only support one dispatcher';
|
|
err_UnhandledException = 'Unhandled exception';
|
|
|
|
err_CannotReadRODLWithoutChannel = 'Cannot read RODL information without a channel';
|
|
err_CannotReadRODLWithoutRemoteService = 'Cannot read RODL information without a remote service';
|
|
|
|
err_CannotAssignClass = 'Cannot Assign a "%s" to a "%s".';
|
|
|
|
err_ChannelBusy = 'Channel is busy. Try again later.';
|
|
|
|
err_DesignTimeProperty = '%s is a designtime-only property';
|
|
|
|
// SOAP
|
|
err_ExpectedParameterNotFound = 'Expected parameter "%s" was not found.'; // Raised by TROSOAPMessage when an expected parameter was not found
|
|
err_AmbigousResponse = 'Ambigous response. Expected one "%s" but %d were received'; // Raised by TROSOAPMessage when two parameters in a a SOAP Envelope have the same name
|
|
err_InvalidEnvelope = 'Invalid SOAP Envelope. %s'; // Invalid SOAP envelope. The message is completed with additional information
|
|
err_InvalidData = 'Cannot convert data for parameter "%s"'#13'Exception was "%s"'#13'Data was "%s".'; // Error converting the text of the parameter to a Delphi type
|
|
|
|
inf_InvalidEnvelopeNode = 'SOAP Envelope node missing or not root.'; // The SOAP envelope does not match the SOAP specs by not providing an Envelope node
|
|
inf_AbsentBody = 'SOAP envelope does not contain a Body.'; // The SOAP envelope does not contain a body
|
|
inf_AbsentMessage = 'SOAP Body does not contain a message nor a fault'; // The body does not contain any sub node
|
|
|
|
err_ArrayIndexOutOfBounds = 'Array index out of bounds (%d).';
|
|
|
|
// BIN
|
|
err_InvalidHeader = 'Invalid binary header. Either incompatible or not a binary message.';
|
|
err_InvalidHeaderEncrypted = 'Invalid binary header. It seems that encryption is active on the other side of the communication, but not locally?';
|
|
err_UnknownClassInStream = 'Unknown class "%s" found in stream.';
|
|
err_UnexpectedClassInStream = 'Unexpected class found in stream; class "%s" does not descend from "%s".';
|
|
err_InvalidDateTimeReadFromStream = 'Invalid DateTime read from Stream.';
|
|
|
|
// WinMessageChannel
|
|
err_CannotFindServer = 'Cannot find server "%s"';
|
|
err_MessagePropertyMustBeSet = 'Message property must be assigned for the server to be active';
|
|
err_WinMessageFailed = 'Communication with the WinMessage Server failed or timed out (Error Code %d)';
|
|
|
|
// WInINet channel
|
|
err_UnexpectedWinINetProblem = 'Unexpected error in WinInet HTTP Channel (%d)';
|
|
err_CommunicationWithServerTimedOut = 'Communication with the server timed out (after %sms)';
|
|
|
|
// BPDX Channels
|
|
err_CannotConnectToServer = 'Cannot connect to server "%s"';
|
|
err_ConnectionError = 'Connection error';
|
|
|
|
// Standard Class Factories
|
|
err_PoolSizeMustBe1orHigher = 'Pool Size must be 1 or higher';
|
|
err_NoFreeObjectsInPool = 'There are no free objects in the pool for %s, all %d instances are in use. Please try again later.';
|
|
|
|
// Misc
|
|
msg_NoMultipleDispatchers = 'Multiple message dispatchers not supported';
|
|
err_InvalidStorage = 'Invalid storage';
|
|
err_ErrorConvertingFloat = 'Error converting float "%s" at byte %d';
|
|
|
|
err_SessionNotFound = 'Session %s could not be found';
|
|
|
|
err_ChannelDoesntSupportIROMetadataReader = 'Channel does not support IROMetadataReader';
|
|
|
|
// Sessions
|
|
err_TooManySessions = 'Too many sessions. Try again in %d minute(s)';
|
|
|
|
// XML
|
|
err_DOMElementIsNIL = 'DOMElement is NIL';
|
|
err_IndexOutOfBounds = 'Index out of bounds';
|
|
err_CannotLoadXMLDocument = 'Cannot load XML document.'#13'Reason: %s'#13'Line: %d'#13'Position: %d';
|
|
err_ErrorCreatingMsXmlDoc = 'Error creating MSXML Document class'#13#13'%s: %s';
|
|
err_NoXMLParsersAvailable = 'MSXML is not installed';
|
|
|
|
// Variant conversion
|
|
err_IDispatchMarshalingNotSupported = 'Marshaling of IDispatch (%d) type variants is not supported.';
|
|
err_UnsupportedVariantType = 'Unsupported variant type "%d"';
|
|
err_InvalidBinaryFormat = 'Invalid binary format for a variant';
|
|
err_VariantIsNotArray = 'Variant must be Array, but is %d';
|
|
err_InvalidVarArrayDimCount = 'Variant Array DimCount must be 1 but is %d';
|
|
|
|
// uRODL and similar collections (see uRODynamicRequest)
|
|
err_CannotFindParameter = 'Cannot find parameter %s';
|
|
err_CannotFindService = 'Cannot find service %s';
|
|
err_RODLResourceNotLoaded = 'RODL resource has not been loaded';
|
|
|
|
err_MayNotAddResult = 'Cannot add Result parameter to collection. Use AddResult instead';
|
|
|
|
//
|
|
err_OperationNameNeedsServiceName = 'Cannot set the OperationName without a ServiceName';
|
|
err_ServiceNameIsNotSet = 'ServiceName is not set';
|
|
|
|
err_EventReceivedNotConnectedToMessage = 'The event receiver must be connected to a message component first';
|
|
err_MessageNotAssigned = 'Message is NIL';
|
|
|
|
err_UnknownMessageType = 'Unknown message type "%s"';
|
|
|
|
err_MasterServerNeedsChannel = 'No Channel assigned to %s.';
|
|
|
|
err_StreamIsReadOnly = 'Stream is read-only.';
|
|
|
|
{$IFDEF DOTNET}
|
|
err_NotImplementedForDotNetYet = 'This function is not yet implemented for .NET yet.';
|
|
{$ENDIF DOTNET}
|
|
|
|
implementation
|
|
|
|
end.
|