stream class %SOAP.Binary
extends %Net.ChunkedWriter
Implementation of binary protocol for transferring SOAP messages between
Cache instances.
A SOAP message is sent as the serialized form of a %SOAP.Descriptor subclass
including the entire tree of referenced objects. For each class sent a description
of the class is sent followed later by one or more instances of the class data.
The physical format of the message is multiple blocks each of which begins with a
five (5) ASCII character length followed by $list of the specified length. The logical
values that are described below are stored in the $list.
Four possible top level structures are used: class definition, class instance
and error.
Header: - must be first structure.
$$$soapBinaryHeader
version - $$$soapBinaryVersion
SERVICENAME of web service to be used to
table - $$$soapBinaryRaw or $$$soapBinaryUTF8
sessionFlag - 1 if SOAPSESSION is supported.
Class Definition:
$$$soapBinaryClassDefinition
index - integer index that is usede to reference this definition.
class name. Used for matching to classes.
numProperties - number of property definitions that follow.
Property Definition for each property:
name - name of the property.
category - $$$soapBinaryLiteral, $$$soapBinaryStream, $$$soapBinaryObject
with $$$soapBinaryList or $$$soapBinaryArray flags OR'ed if needed.
Class Instance:
$$$soapBinaryClassInstance or $$$soapBinaryTopInstance
$$$soapBinaryTopInstance indicates the object is a top level instance specified
in the routinne call.
oref - oref of the instance on the sending system as an integer .
index - index of the class definition
Property Values - number and type determined from class definition.
$$$soapBinaryLiteral - literal value including stream
$$$soapBinaryLitChar - flag to indicate that literal is a character string
$$$soapBinaryLitBin - flag too indicate that literal is a binary string
literal string value >16000 is represented as $lb()_$lb(segment)*_$lb()
$$$soapBinaryObject - oref of object followed by
index of class definition or a class definition if no previous for this class.
Optionally a class defintion may proceed the oref. The class definition is
Class definition is marked by $lb() instead of $$$soapBinaryClassDefinition.
$$$soapBinaryList - flag to indicate list follows.
numItems - Number of items
items -- numItems
value corrresponding to category
$$$soapBinaryArray - flag to indicate list follows.
numItems - Number of items
items -- numItems
key
value corrresponding to category
Error:
$$$soapBinaryFault
faultcode - from %SOAP.Fault
faultstring - from %SOAP.Fault
faultactor - from %SOAP.Fault
detail - from %SOAP.Fault
To Do:
UTF8 if mismatched NLS charset --
Matching class names -- exact name not required.
Chunked Http
Binary block length
%XML.DataSet
Support XMLREFERENCE=summary,id,oid,guid
property AsUTF8
as %Boolean;
True if strings in the output needs to be converted to UTF-8
property Chunked
as %Boolean;
Set to 1 if chunked output is to be used.
property IsRequest
as %Boolean;
True if this is a SOAP request
property MessageList
as %RegisteredObject [ MultiDimensional ];
List of classes to output
property ServiceName
as %String;
Name of the SOAP service if this is a SOAP request or response
property SessionFlag
as %Boolean;
True if this is request is in a SOAP session.
classmethod LogMessage(service As %Boolean, action As %String, data, status As %Status)
method OutputStream()
Override of method to do the chunked output using the utility functions defined
by the abstract super class.