SoapSerializer
Overview
Class for serializing/deserializing data of any type to xml-based Soap document.
This class is used basically by the SoapMessage class to read or write data in the SOAP format. To operate with custom types, TypeManager class is using.
All read/write methods of this class (like ReadInt32, WriteInt32, etc) are used indirectly in _intf files on the client side and in _invk files on the server side to serialize data before send it over the network. These files are generated automatically from the RODL by the Service Builder, so you don't need to edit them.
In most cases there is no need to instantiate this class directly.
For internal use only.
Location
- Reference: RemObjects.SDK.dll
- Namespace: RemObjects.SDK
- Ancestry: Serializer | SoapSerializer
constructor protected (declared in Serializer)
Empty constructor.
constructor
SoapSerializer()
Sub New()
constructor (SoapMessage)
Creates a new instanse of SoapSerializer class
Parameters:
- aOwner: a Message that should use newly created serializer
BeginReadComplex protected
method BeginReadComplex(name: String; type: Type; out value: ComplexType): Boolean
Boolean BeginReadComplex(String name, Type type, out ComplexType value)
Function BeginReadComplex(name As String, type As Type, <OutAttribute> ByRef value As ComplexType) As Boolean
Parameters:
- name:
- type:
- value:
BeginReadObject protected
Creates instance of an object to be read according to the type info from xsi:type attribute.
method BeginReadObject(name: String; type: Type): Object
Object BeginReadObject(String name, Type type)
Function BeginReadObject(name As String, type As Type) As Object
Parameters:
- name: A name of an object.
- type: A type of an object to read.
BeginWriteComplex protected
method BeginWriteComplex(name: String; value: ComplexType): Boolean
Boolean BeginWriteComplex(String name, ComplexType value)
Function BeginWriteComplex(name As String, value As ComplexType) As Boolean
Parameters:
- name:
- value:
BeginWriteObject protected
Writes provided object the curent node.
method BeginWriteObject(name: String; value: Object)
void BeginWriteObject(String name, Object value)
Sub BeginWriteObject(name As String, value As Object)
Parameters:
- name: A name of the node to write the object.
- value: An object itself.
CodeFirstTypeConverters (declared in Serializer)
class property CodeFirstTypeConverters: Dictionary<Type, CodeFirstTypeConverterRegistration> read;
class Dictionary<Type, CodeFirstTypeConverterRegistration> CodeFirstTypeConverters { get; }
Shared ReadOnly Property CodeFirstTypeConverters() As Dictionary<Type, CodeFirstTypeConverterRegistration>
CreateComplexTypeInstance protected (declared in Serializer)
method CreateComplexTypeInstance(className: String): ComplexType
ComplexType CreateComplexTypeInstance(String className)
Function CreateComplexTypeInstance(className As String) As ComplexType
Parameters:
- className:
CurrentNamespace
If some node is adding to the soap xml document, then it will be added with the namespace from this property. Default value is 'http://tempuri.org' but it can be changed by the SoapMessage instance or manually in SoapSerializer.
property CurrentNamespace: String read;
String CurrentNamespace { get; }
ReadOnly Property CurrentNamespace() As String
EndReadComplex protected
method EndReadComplex
void EndReadComplex()
Sub EndReadComplex()
EndReadObject protected
method EndReadObject
void EndReadObject()
Sub EndReadObject()
EndWriteComplex protected
method EndWriteComplex(value: ComplexType)
void EndWriteComplex(ComplexType value)
Sub EndWriteComplex(value As ComplexType)
Parameters:
- value:
EndWriteObject protected
method EndWriteObject
void EndWriteObject()
Sub EndWriteObject()
Prefix
The prefix that will be used in the child nodes of the soap body element. If not set, the value v1 is used (the number in the prefix increments on each hierarchical level, like v2, v3, etc). Note, that the prefix value is reset to default v%num% if change a CurrentNamespace property.
property Prefix: String read write;
String Prefix { get; set; }
Property Prefix() As String
Read (declared in Serializer)
The general method for reading that calls specific ReadXXX method dependently on the type of an object to read.
method Read(name: String; type: Type; format: StreamingFormat): Object
Object Read(String name, Type type, StreamingFormat format)
Function Read(name As String, type As Type, format As StreamingFormat) As Object
Parameters:
- name:
- type:
- format:
ReadAnsiString
Reads ANSI string value from the inner text of the current node.
method ReadAnsiString(name: String): String
String ReadAnsiString(String name)
Function ReadAnsiString(name As String) As String
Parameters:
- name: A name of the node to read from.
ReadArray
Creates an instance of typed Array and fills it with objects from the current node.
method ReadArray(name: String; type: Type; format: StreamingFormat): Array
Array ReadArray(String name, Type type, StreamingFormat format)
Function ReadArray(name As String, type As Type, format As StreamingFormat) As Array
Parameters:
- name: A name of the node to read from.
- type: A type of the target array. Required to create a proper typed instance of the array.
- format: Can be useful for several types of array's elements.
ReadBinary
Reads binary value from the specified node, decodes and returns it.
method ReadBinary(name: String): Binary
Binary ReadBinary(String name)
Function ReadBinary(name As String) As Binary
Parameters:
- name: A name of the node to read from.
ReadBoolean
Reads boolean value from the specified node, decodes and returns it.
method ReadBoolean(name: String): Boolean
Boolean ReadBoolean(String name)
Function ReadBoolean(name As String) As Boolean
Parameters:
- name: A name of the node to read from.
ReadComplex (declared in Serializer)
method ReadComplex(name: String; type: Type): ComplexType
ComplexType ReadComplex(String name, Type type)
Function ReadComplex(name As String, type As Type) As ComplexType
Parameters:
- name:
- type:
ReadCurrency
Reads currency value from the specified node, decodes and returns it.
method ReadCurrency(name: String): Decimal
Decimal ReadCurrency(String name)
Function ReadCurrency(name As String) As Decimal
Parameters:
- name: A name of the node to read from.
ReadCustomEnum
Reads ICustomEnum value from the specified node, decodes and returns it.
method ReadCustomEnum(name: String): ICustomEnum
ICustomEnum ReadCustomEnum(String name)
Function ReadCustomEnum(name As String) As ICustomEnum
Parameters:
- name: A name of the node to read from.
ReadDateTime
Reads datetime string in SOAP format from the specified node, converts it to DateTime value and returns it.
method ReadDateTime(name: String): DateTime
DateTime ReadDateTime(String name)
Function ReadDateTime(name As String) As DateTime
Parameters:
- name: A name of the node to read from.
ReadDecimal
Reads decimal value from the specified node, decodes and returns it.
method ReadDecimal(name: String): Decimal
Decimal ReadDecimal(String name)
Function ReadDecimal(name As String) As Decimal
Parameters:
- name: A name of the node to read from.
ReadDouble
Reads double value from the specified node, decodes and returns it.
method ReadDouble(name: String): Double
Double ReadDouble(String name)
Function ReadDouble(name As String) As Double
Parameters:
- name: A name of the node to read from.
ReadEnum
Reads enumeration from the specified node and returns it.
method ReadEnum(name: String; type: Type): Enum
Enum ReadEnum(String name, Type type)
Function ReadEnum(name As String, type As Type) As Enum
Parameters:
- name: A name of the node to read from.
- type: A type of the enum to read.
ReadException (declared in Serializer)
method ReadException(type: Type; message: String; isFromServer: Boolean): Exception
Exception ReadException(Type type, String message, Boolean isFromServer)
Function ReadException(type As Type, message As String, isFromServer As Boolean) As Exception
Parameters:
- type:
- message:
- isFromServer:
ReadExceptionDetails
Read aditional exception fields from exception's node
method ReadExceptionDetails(exception: Object; node: XmlNode)
void ReadExceptionDetails(Object exception, XmlNode node)
Sub ReadExceptionDetails(exception As Object, node As XmlNode)
Parameters:
- exception: An exception which properties need to be filled with data.
- node: A node that contains extra data of the exception.
ReadFromStream
Does nothing in this implementation.
method ReadFromStream(stream: Stream)
void ReadFromStream(Stream stream)
Sub ReadFromStream(stream As Stream)
Parameters:
- stream: A stream to read the message from.
ReadGenericArray
Reads generic array from the specified node and returns correspondent IList collection.
method ReadGenericArray(name: String; type: Type; format: StreamingFormat): IList
IList ReadGenericArray(String name, Type type, StreamingFormat format)
Function ReadGenericArray(name As String, type As Type, format As StreamingFormat) As IList
Parameters:
- name: A name of the node to read from.
- type: A type of the array object to read.
- format: Can be useful for several types of array's elements.
ReadGuid
Reads GUID value from the specified node, decodes and returns it.
method ReadGuid(name: String): Guid
Guid ReadGuid(String name)
Function ReadGuid(name As String) As Guid
Parameters:
- name: A name of the node to read from.
ReadInt32
Reads Int32
value.
method ReadInt32(name: String): Int32
Int32 ReadInt32(String name)
Function ReadInt32(name As String) As Int32
Parameters:
- name:
ReadInt64
Reads Int64
value.
method ReadInt64(name: String): Int64
Int64 ReadInt64(String name)
Function ReadInt64(name As String) As Int64
Parameters:
- name:
ReadNullableBoolean
method ReadNullableBoolean(name: String): nullable Boolean
Boolean? ReadNullableBoolean(String name)
Function ReadNullableBoolean(name As String) As Boolean?
Parameters:
- name:
ReadNullableCurrency
method ReadNullableCurrency(name: String): nullable Decimal
Decimal? ReadNullableCurrency(String name)
Function ReadNullableCurrency(name As String) As Decimal?
Parameters:
- name:
ReadNullableDateTime
method ReadNullableDateTime(name: String): nullable DateTime
DateTime? ReadNullableDateTime(String name)
Function ReadNullableDateTime(name As String) As DateTime?
Parameters:
- name:
ReadNullableDecimal
method ReadNullableDecimal(name: String): nullable Decimal
Decimal? ReadNullableDecimal(String name)
Function ReadNullableDecimal(name As String) As Decimal?
Parameters:
- name:
ReadNullableDouble
method ReadNullableDouble(name: String): nullable Double
Double? ReadNullableDouble(String name)
Function ReadNullableDouble(name As String) As Double?
Parameters:
- name:
ReadNullableEnum
method ReadNullableEnum(name: String; type: Type): nullable Enum
Enum? ReadNullableEnum(String name, Type type)
Function ReadNullableEnum(name As String, type As Type) As Enum?
Parameters:
- name:
- type:
ReadNullableGuid
method ReadNullableGuid(name: String): nullable Guid
Guid? ReadNullableGuid(String name)
Function ReadNullableGuid(name As String) As Guid?
Parameters:
- name:
ReadNullableInt32
method ReadNullableInt32(name: String): nullable Int32
Int32? ReadNullableInt32(String name)
Function ReadNullableInt32(name As String) As Int32?
Parameters:
- name:
ReadNullableInt64
method ReadNullableInt64(name: String): nullable Int64
Int64? ReadNullableInt64(String name)
Function ReadNullableInt64(name As String) As Int64?
Parameters:
- name:
ReadObject (declared in Serializer)
method ReadObject(name: String; type: Type): Object
Object ReadObject(String name, Type type)
Function ReadObject(name As String, type As Type) As Object
Parameters:
- name:
- type:
ReadObjectData (declared in Serializer)
method ReadObjectData(value: Object)
void ReadObjectData(Object value)
Sub ReadObjectData(value As Object)
Parameters:
- value:
ReadUtf8String
Reads String value in UTF8 format from the specified node, decodes and returns it.
method ReadUtf8String(name: String): String
String ReadUtf8String(String name)
Function ReadUtf8String(name As String) As String
Parameters:
- name: A name of the node to read from.
ReadVariant
Reads Variant value from the specified node, decodes and returns it as Object.
method ReadVariant(name: String): Object
Object ReadVariant(String name)
Function ReadVariant(name As String) As Object
Parameters:
- name: A name of the node to read from.
ReadWideString
Reads String value from the specified node, decodes and returns it.
method ReadWideString(name: String): String
String ReadWideString(String name)
Function ReadWideString(name As String) As String
Parameters:
- name: A name of the node to read from.
ReadXml
Acoording to flag EncodedXml from SoapMessage.SerializationOptions method tries to get xml node either from espaced string (flag is set), or from inline xml node of Soap document.
method ReadXml(name: String): XmlNode
XmlNode ReadXml(String name)
Function ReadXml(name As String) As XmlNode
Parameters:
- name: A name of the node to read from.
ReadXsDateTime
Reads datetime string in SOAP format from the specified node, converts it to XsDateTime value.
method ReadXsDateTime(name: String): XsDateTime
XsDateTime ReadXsDateTime(String name)
Function ReadXsDateTime(name As String) As XsDateTime
Parameters:
- name: A name of the node to read from.
RecordStrictOrder
Order of complex types fields in which they will be stored to the Xml document. If set to true the order or fields remains the same as in native type.If false, fields will be ordered alphabetically.
property RecordStrictOrder: Boolean read;
Boolean RecordStrictOrder { get; }
ReadOnly Property RecordStrictOrder() As Boolean
SetCurrentNamespace
method SetCurrentNamespace(ns: String)
void SetCurrentNamespace(String ns)
Sub SetCurrentNamespace(ns As String)
Parameters:
- ns:
SetCurrentNode
Set the specified node as current. Then, current node can be used in read/write methods.
method SetCurrentNode(node: XmlNode)
void SetCurrentNode(XmlNode node)
Sub SetCurrentNode(node As XmlNode)
Parameters:
- node: The given node.
TypeFactory (declared in Serializer)
When doing custom reading/writing of values, the type factory can be used to provide custom serializable types.
property TypeFactory: ITypeFactory read write;
ITypeFactory TypeFactory { get; set; }
Property TypeFactory() As ITypeFactory
Write (String, Object, StreamingFormat) (declared in Serializer)
method Write(name: String; value: Object; format: StreamingFormat)
void Write(String name, Object value, StreamingFormat format)
Sub Write(name As String, value As Object, format As StreamingFormat)
Parameters:
- name:
- value:
- format:
Write (String, Object, Type, StreamingFormat) (declared in Serializer)
The general method for writing that calls specific WriteXXX method dependently on the type of an object to write.
method Write(name: String; value: Object; type: Type; format: StreamingFormat)
void Write(String name, Object value, Type type, StreamingFormat format)
Sub Write(name As String, value As Object, type As Type, format As StreamingFormat)
Parameters:
- name:
- value:
- type:
- format:
WriteAnsiString
Writes ANSI string to the specified node.
method WriteAnsiString(name: String; value: String)
void WriteAnsiString(String name, String value)
Sub WriteAnsiString(name As String, value As String)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteArray
Writes array with specified values and streaming format to the specified node.
method WriteArray(name: String; value: Array; format: StreamingFormat)
void WriteArray(String name, Array value, StreamingFormat format)
Sub WriteArray(name As String, value As Array, format As StreamingFormat)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
- format: Can be useful for several types of array's elements.
WriteBinary
Encodes specified binary value to Base64
format and writes it to the specified node.
method WriteBinary(name: String; value: Stream)
void WriteBinary(String name, Stream value)
Sub WriteBinary(name As String, value As Stream)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteBoolean
Writes Boolean to the specified node.
method WriteBoolean(name: String; value: Boolean)
void WriteBoolean(String name, Boolean value)
Sub WriteBoolean(name As String, value As Boolean)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteComplex (declared in Serializer)
method WriteComplex(name: String; value: ComplexType)
void WriteComplex(String name, ComplexType value)
Sub WriteComplex(name As String, value As ComplexType)
Parameters:
- name:
- value:
WriteCurrency
Writes Currency value to the specified node.
method WriteCurrency(name: String; value: Decimal)
void WriteCurrency(String name, Decimal value)
Sub WriteCurrency(name As String, value As Decimal)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteCustomEnum
Writes value of ICustomEnum the specified node.
method WriteCustomEnum(name: String; value: ICustomEnum)
void WriteCustomEnum(String name, ICustomEnum value)
Sub WriteCustomEnum(name As String, value As ICustomEnum)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteDateTime
Writes DateTime value to the specified node.
method WriteDateTime(name: String; value: DateTime)
void WriteDateTime(String name, DateTime value)
Sub WriteDateTime(name As String, value As DateTime)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteDecimal
Writes decimal value to the specified node.
method WriteDecimal(name: String; value: Decimal)
void WriteDecimal(String name, Decimal value)
Sub WriteDecimal(name As String, value As Decimal)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteDouble
Writes double value to the specified node.
method WriteDouble(name: String; value: Double)
void WriteDouble(String name, Double value)
Sub WriteDouble(name As String, value As Double)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteEnum
Writes specified enumeration value to the specified node.
method WriteEnum(name: String; value: Enum)
void WriteEnum(String name, Enum value)
Sub WriteEnum(name As String, value As Enum)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteExceptionDetails
Writes extra data of the given exception into the current node.
method WriteExceptionDetails(exception: Object; node: XmlNode)
void WriteExceptionDetails(Object exception, XmlNode node)
Sub WriteExceptionDetails(exception As Object, node As XmlNode)
Parameters:
- exception: An exception to write.
- node: A node to write the exception to.
WriteGenericArray
A name of the node to write to.
method WriteGenericArray(name: String; value: IList; format: StreamingFormat)
void WriteGenericArray(String name, IList value, StreamingFormat format)
Sub WriteGenericArray(name As String, value As IList, format As StreamingFormat)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
- format: Can be useful for several types of array's elements.
WriteGuid
Writes GUID value to the specified node.
method WriteGuid(name: String; value: Guid)
void WriteGuid(String name, Guid value)
Sub WriteGuid(name As String, value As Guid)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteInt32
Writes Int32 value to the specified node.
method WriteInt32(name: String; value: Int32)
void WriteInt32(String name, Int32 value)
Sub WriteInt32(name As String, value As Int32)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteInt64
Writes Int64 value to the specified node.
method WriteInt64(name: String; value: Int64)
void WriteInt64(String name, Int64 value)
Sub WriteInt64(name As String, value As Int64)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteNullableBoolean
method WriteNullableBoolean(name: String; value: Nullable<Boolean>)
void WriteNullableBoolean(String name, Nullable<Boolean> value)
Sub WriteNullableBoolean(name As String, value As Nullable<Boolean>)
Parameters:
- name:
- value:
WriteNullableCurrency
method WriteNullableCurrency(name: String; value: Nullable<Decimal>)
void WriteNullableCurrency(String name, Nullable<Decimal> value)
Sub WriteNullableCurrency(name As String, value As Nullable<Decimal>)
Parameters:
- name:
- value:
WriteNullableDateTime
method WriteNullableDateTime(name: String; value: Nullable<DateTime>)
void WriteNullableDateTime(String name, Nullable<DateTime> value)
Sub WriteNullableDateTime(name As String, value As Nullable<DateTime>)
Parameters:
- name:
- value:
WriteNullableDecimal
method WriteNullableDecimal(name: String; value: Nullable<Decimal>)
void WriteNullableDecimal(String name, Nullable<Decimal> value)
Sub WriteNullableDecimal(name As String, value As Nullable<Decimal>)
Parameters:
- name:
- value:
WriteNullableDouble
method WriteNullableDouble(name: String; value: Nullable<Double>)
void WriteNullableDouble(String name, Nullable<Double> value)
Sub WriteNullableDouble(name As String, value As Nullable<Double>)
Parameters:
- name:
- value:
WriteNullableEnum
method WriteNullableEnum(name: String; value: nullable Enum)
void WriteNullableEnum(String name, Enum? value)
Sub WriteNullableEnum(name As String, value As Enum?)
Parameters:
- name:
- value:
WriteNullableGuid
method WriteNullableGuid(name: String; value: Nullable<Guid>)
void WriteNullableGuid(String name, Nullable<Guid> value)
Sub WriteNullableGuid(name As String, value As Nullable<Guid>)
Parameters:
- name:
- value:
WriteNullableInt32
method WriteNullableInt32(name: String; value: Nullable<Int32>)
void WriteNullableInt32(String name, Nullable<Int32> value)
Sub WriteNullableInt32(name As String, value As Nullable<Int32>)
Parameters:
- name:
- value:
WriteNullableInt64
method WriteNullableInt64(name: String; value: Nullable<Int64>)
void WriteNullableInt64(String name, Nullable<Int64> value)
Sub WriteNullableInt64(name As String, value As Nullable<Int64>)
Parameters:
- name:
- value:
WriteObject (declared in Serializer)
This method is a wrapper for Write method. It defines a type and streaming format of passed object.
method WriteObject(name: String; value: Object)
void WriteObject(String name, Object value)
Sub WriteObject(name As String, value As Object)
Parameters:
- name:
- value:
WriteObjectData (declared in Serializer)
method WriteObjectData(value: Object)
void WriteObjectData(Object value)
Sub WriteObjectData(value As Object)
Parameters:
- value:
WriteToStream
Does nothing in this implementation.
method WriteToStream(stream: Stream)
void WriteToStream(Stream stream)
Sub WriteToStream(stream As Stream)
Parameters:
- stream: A stream to write to.
WriteUtf8String
Writes string vaule in UTF8 format to the specified node.
method WriteUtf8String(name: String; value: String)
void WriteUtf8String(String name, String value)
Sub WriteUtf8String(name As String, value As String)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteVariant
Writes Variant object to the specified node.
method WriteVariant(name: String; value: Object)
void WriteVariant(String name, Object value)
Sub WriteVariant(name As String, value As Object)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteWideString
Writes wide string value to the specified node.
method WriteWideString(name: String; value: String)
void WriteWideString(String name, String value)
Sub WriteWideString(name As String, value As String)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteXml
The format in which xml will be serialized depends on flag EncodedXml in SoapMessage.SerializationOptions. Xml will be serialized into WideString if flag is set, or inserted in soap document as Xml node if flag isn't set.
method WriteXml(name: String; value: XmlNode)
void WriteXml(String name, XmlNode value)
Sub WriteXml(name As String, value As XmlNode)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteXsDateTime
Writes XsDateTime value to the specified node.
method WriteXsDateTime(name: String; value: XsDateTime)
void WriteXsDateTime(String name, XsDateTime value)
Sub WriteXsDateTime(name As String, value As XsDateTime)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
CurrentNamespace
If some node is adding to the soap xml document, then it will be added with the namespace from this property. Default value is 'http://tempuri.org' but it can be changed by the SoapMessage instance or manually in SoapSerializer.
property CurrentNamespace: String read;
String CurrentNamespace { get; }
ReadOnly Property CurrentNamespace() As String
Prefix
The prefix that will be used in the child nodes of the soap body element. If not set, the value v1 is used (the number in the prefix increments on each hierarchical level, like v2, v3, etc). Note, that the prefix value is reset to default v%num% if change a CurrentNamespace property.
property Prefix: String read write;
String Prefix { get; set; }
Property Prefix() As String
RecordStrictOrder
Order of complex types fields in which they will be stored to the Xml document. If set to true the order or fields remains the same as in native type.If false, fields will be ordered alphabetically.
property RecordStrictOrder: Boolean read;
Boolean RecordStrictOrder { get; }
ReadOnly Property RecordStrictOrder() As Boolean
TypeFactory (declared in Serializer)
When doing custom reading/writing of values, the type factory can be used to provide custom serializable types.
property TypeFactory: ITypeFactory read write;
ITypeFactory TypeFactory { get; set; }
Property TypeFactory() As ITypeFactory
CodeFirstTypeConverters (declared in Serializer)
class property CodeFirstTypeConverters: Dictionary<Type, CodeFirstTypeConverterRegistration> read;
class Dictionary<Type, CodeFirstTypeConverterRegistration> CodeFirstTypeConverters { get; }
Shared ReadOnly Property CodeFirstTypeConverters() As Dictionary<Type, CodeFirstTypeConverterRegistration>
constructor protected (declared in Serializer)
Empty constructor.
constructor
SoapSerializer()
Sub New()
constructor (SoapMessage)
Creates a new instanse of SoapSerializer class
Parameters:
- aOwner: a Message that should use newly created serializer
BeginReadComplex protected
method BeginReadComplex(name: String; type: Type; out value: ComplexType): Boolean
Boolean BeginReadComplex(String name, Type type, out ComplexType value)
Function BeginReadComplex(name As String, type As Type, <OutAttribute> ByRef value As ComplexType) As Boolean
Parameters:
- name:
- type:
- value:
BeginReadObject protected
Creates instance of an object to be read according to the type info from xsi:type attribute.
method BeginReadObject(name: String; type: Type): Object
Object BeginReadObject(String name, Type type)
Function BeginReadObject(name As String, type As Type) As Object
Parameters:
- name: A name of an object.
- type: A type of an object to read.
BeginWriteComplex protected
method BeginWriteComplex(name: String; value: ComplexType): Boolean
Boolean BeginWriteComplex(String name, ComplexType value)
Function BeginWriteComplex(name As String, value As ComplexType) As Boolean
Parameters:
- name:
- value:
BeginWriteObject protected
Writes provided object the curent node.
method BeginWriteObject(name: String; value: Object)
void BeginWriteObject(String name, Object value)
Sub BeginWriteObject(name As String, value As Object)
Parameters:
- name: A name of the node to write the object.
- value: An object itself.
CreateComplexTypeInstance protected (declared in Serializer)
method CreateComplexTypeInstance(className: String): ComplexType
ComplexType CreateComplexTypeInstance(String className)
Function CreateComplexTypeInstance(className As String) As ComplexType
Parameters:
- className:
EndReadComplex protected
method EndReadComplex
void EndReadComplex()
Sub EndReadComplex()
EndReadObject protected
method EndReadObject
void EndReadObject()
Sub EndReadObject()
EndWriteComplex protected
method EndWriteComplex(value: ComplexType)
void EndWriteComplex(ComplexType value)
Sub EndWriteComplex(value As ComplexType)
Parameters:
- value:
EndWriteObject protected
method EndWriteObject
void EndWriteObject()
Sub EndWriteObject()
Read (declared in Serializer)
The general method for reading that calls specific ReadXXX method dependently on the type of an object to read.
method Read(name: String; type: Type; format: StreamingFormat): Object
Object Read(String name, Type type, StreamingFormat format)
Function Read(name As String, type As Type, format As StreamingFormat) As Object
Parameters:
- name:
- type:
- format:
ReadAnsiString
Reads ANSI string value from the inner text of the current node.
method ReadAnsiString(name: String): String
String ReadAnsiString(String name)
Function ReadAnsiString(name As String) As String
Parameters:
- name: A name of the node to read from.
ReadArray
Creates an instance of typed Array and fills it with objects from the current node.
method ReadArray(name: String; type: Type; format: StreamingFormat): Array
Array ReadArray(String name, Type type, StreamingFormat format)
Function ReadArray(name As String, type As Type, format As StreamingFormat) As Array
Parameters:
- name: A name of the node to read from.
- type: A type of the target array. Required to create a proper typed instance of the array.
- format: Can be useful for several types of array's elements.
ReadBinary
Reads binary value from the specified node, decodes and returns it.
method ReadBinary(name: String): Binary
Binary ReadBinary(String name)
Function ReadBinary(name As String) As Binary
Parameters:
- name: A name of the node to read from.
ReadBoolean
Reads boolean value from the specified node, decodes and returns it.
method ReadBoolean(name: String): Boolean
Boolean ReadBoolean(String name)
Function ReadBoolean(name As String) As Boolean
Parameters:
- name: A name of the node to read from.
ReadComplex (declared in Serializer)
method ReadComplex(name: String; type: Type): ComplexType
ComplexType ReadComplex(String name, Type type)
Function ReadComplex(name As String, type As Type) As ComplexType
Parameters:
- name:
- type:
ReadCurrency
Reads currency value from the specified node, decodes and returns it.
method ReadCurrency(name: String): Decimal
Decimal ReadCurrency(String name)
Function ReadCurrency(name As String) As Decimal
Parameters:
- name: A name of the node to read from.
ReadCustomEnum
Reads ICustomEnum value from the specified node, decodes and returns it.
method ReadCustomEnum(name: String): ICustomEnum
ICustomEnum ReadCustomEnum(String name)
Function ReadCustomEnum(name As String) As ICustomEnum
Parameters:
- name: A name of the node to read from.
ReadDateTime
Reads datetime string in SOAP format from the specified node, converts it to DateTime value and returns it.
method ReadDateTime(name: String): DateTime
DateTime ReadDateTime(String name)
Function ReadDateTime(name As String) As DateTime
Parameters:
- name: A name of the node to read from.
ReadDecimal
Reads decimal value from the specified node, decodes and returns it.
method ReadDecimal(name: String): Decimal
Decimal ReadDecimal(String name)
Function ReadDecimal(name As String) As Decimal
Parameters:
- name: A name of the node to read from.
ReadDouble
Reads double value from the specified node, decodes and returns it.
method ReadDouble(name: String): Double
Double ReadDouble(String name)
Function ReadDouble(name As String) As Double
Parameters:
- name: A name of the node to read from.
ReadEnum
Reads enumeration from the specified node and returns it.
method ReadEnum(name: String; type: Type): Enum
Enum ReadEnum(String name, Type type)
Function ReadEnum(name As String, type As Type) As Enum
Parameters:
- name: A name of the node to read from.
- type: A type of the enum to read.
ReadException (declared in Serializer)
method ReadException(type: Type; message: String; isFromServer: Boolean): Exception
Exception ReadException(Type type, String message, Boolean isFromServer)
Function ReadException(type As Type, message As String, isFromServer As Boolean) As Exception
Parameters:
- type:
- message:
- isFromServer:
ReadExceptionDetails
Read aditional exception fields from exception's node
method ReadExceptionDetails(exception: Object; node: XmlNode)
void ReadExceptionDetails(Object exception, XmlNode node)
Sub ReadExceptionDetails(exception As Object, node As XmlNode)
Parameters:
- exception: An exception which properties need to be filled with data.
- node: A node that contains extra data of the exception.
ReadFromStream
Does nothing in this implementation.
method ReadFromStream(stream: Stream)
void ReadFromStream(Stream stream)
Sub ReadFromStream(stream As Stream)
Parameters:
- stream: A stream to read the message from.
ReadGenericArray
Reads generic array from the specified node and returns correspondent IList collection.
method ReadGenericArray(name: String; type: Type; format: StreamingFormat): IList
IList ReadGenericArray(String name, Type type, StreamingFormat format)
Function ReadGenericArray(name As String, type As Type, format As StreamingFormat) As IList
Parameters:
- name: A name of the node to read from.
- type: A type of the array object to read.
- format: Can be useful for several types of array's elements.
ReadGuid
Reads GUID value from the specified node, decodes and returns it.
method ReadGuid(name: String): Guid
Guid ReadGuid(String name)
Function ReadGuid(name As String) As Guid
Parameters:
- name: A name of the node to read from.
ReadInt32
Reads Int32
value.
method ReadInt32(name: String): Int32
Int32 ReadInt32(String name)
Function ReadInt32(name As String) As Int32
Parameters:
- name:
ReadInt64
Reads Int64
value.
method ReadInt64(name: String): Int64
Int64 ReadInt64(String name)
Function ReadInt64(name As String) As Int64
Parameters:
- name:
ReadNullableBoolean
method ReadNullableBoolean(name: String): nullable Boolean
Boolean? ReadNullableBoolean(String name)
Function ReadNullableBoolean(name As String) As Boolean?
Parameters:
- name:
ReadNullableCurrency
method ReadNullableCurrency(name: String): nullable Decimal
Decimal? ReadNullableCurrency(String name)
Function ReadNullableCurrency(name As String) As Decimal?
Parameters:
- name:
ReadNullableDateTime
method ReadNullableDateTime(name: String): nullable DateTime
DateTime? ReadNullableDateTime(String name)
Function ReadNullableDateTime(name As String) As DateTime?
Parameters:
- name:
ReadNullableDecimal
method ReadNullableDecimal(name: String): nullable Decimal
Decimal? ReadNullableDecimal(String name)
Function ReadNullableDecimal(name As String) As Decimal?
Parameters:
- name:
ReadNullableDouble
method ReadNullableDouble(name: String): nullable Double
Double? ReadNullableDouble(String name)
Function ReadNullableDouble(name As String) As Double?
Parameters:
- name:
ReadNullableEnum
method ReadNullableEnum(name: String; type: Type): nullable Enum
Enum? ReadNullableEnum(String name, Type type)
Function ReadNullableEnum(name As String, type As Type) As Enum?
Parameters:
- name:
- type:
ReadNullableGuid
method ReadNullableGuid(name: String): nullable Guid
Guid? ReadNullableGuid(String name)
Function ReadNullableGuid(name As String) As Guid?
Parameters:
- name:
ReadNullableInt32
method ReadNullableInt32(name: String): nullable Int32
Int32? ReadNullableInt32(String name)
Function ReadNullableInt32(name As String) As Int32?
Parameters:
- name:
ReadNullableInt64
method ReadNullableInt64(name: String): nullable Int64
Int64? ReadNullableInt64(String name)
Function ReadNullableInt64(name As String) As Int64?
Parameters:
- name:
ReadObject (declared in Serializer)
method ReadObject(name: String; type: Type): Object
Object ReadObject(String name, Type type)
Function ReadObject(name As String, type As Type) As Object
Parameters:
- name:
- type:
ReadObjectData (declared in Serializer)
method ReadObjectData(value: Object)
void ReadObjectData(Object value)
Sub ReadObjectData(value As Object)
Parameters:
- value:
ReadUtf8String
Reads String value in UTF8 format from the specified node, decodes and returns it.
method ReadUtf8String(name: String): String
String ReadUtf8String(String name)
Function ReadUtf8String(name As String) As String
Parameters:
- name: A name of the node to read from.
ReadVariant
Reads Variant value from the specified node, decodes and returns it as Object.
method ReadVariant(name: String): Object
Object ReadVariant(String name)
Function ReadVariant(name As String) As Object
Parameters:
- name: A name of the node to read from.
ReadWideString
Reads String value from the specified node, decodes and returns it.
method ReadWideString(name: String): String
String ReadWideString(String name)
Function ReadWideString(name As String) As String
Parameters:
- name: A name of the node to read from.
ReadXml
Acoording to flag EncodedXml from SoapMessage.SerializationOptions method tries to get xml node either from espaced string (flag is set), or from inline xml node of Soap document.
method ReadXml(name: String): XmlNode
XmlNode ReadXml(String name)
Function ReadXml(name As String) As XmlNode
Parameters:
- name: A name of the node to read from.
ReadXsDateTime
Reads datetime string in SOAP format from the specified node, converts it to XsDateTime value.
method ReadXsDateTime(name: String): XsDateTime
XsDateTime ReadXsDateTime(String name)
Function ReadXsDateTime(name As String) As XsDateTime
Parameters:
- name: A name of the node to read from.
SetCurrentNamespace
method SetCurrentNamespace(ns: String)
void SetCurrentNamespace(String ns)
Sub SetCurrentNamespace(ns As String)
Parameters:
- ns:
SetCurrentNode
Set the specified node as current. Then, current node can be used in read/write methods.
method SetCurrentNode(node: XmlNode)
void SetCurrentNode(XmlNode node)
Sub SetCurrentNode(node As XmlNode)
Parameters:
- node: The given node.
Write (String, Object, StreamingFormat) (declared in Serializer)
method Write(name: String; value: Object; format: StreamingFormat)
void Write(String name, Object value, StreamingFormat format)
Sub Write(name As String, value As Object, format As StreamingFormat)
Parameters:
- name:
- value:
- format:
Write (String, Object, Type, StreamingFormat) (declared in Serializer)
The general method for writing that calls specific WriteXXX method dependently on the type of an object to write.
method Write(name: String; value: Object; type: Type; format: StreamingFormat)
void Write(String name, Object value, Type type, StreamingFormat format)
Sub Write(name As String, value As Object, type As Type, format As StreamingFormat)
Parameters:
- name:
- value:
- type:
- format:
WriteAnsiString
Writes ANSI string to the specified node.
method WriteAnsiString(name: String; value: String)
void WriteAnsiString(String name, String value)
Sub WriteAnsiString(name As String, value As String)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteArray
Writes array with specified values and streaming format to the specified node.
method WriteArray(name: String; value: Array; format: StreamingFormat)
void WriteArray(String name, Array value, StreamingFormat format)
Sub WriteArray(name As String, value As Array, format As StreamingFormat)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
- format: Can be useful for several types of array's elements.
WriteBinary
Encodes specified binary value to Base64
format and writes it to the specified node.
method WriteBinary(name: String; value: Stream)
void WriteBinary(String name, Stream value)
Sub WriteBinary(name As String, value As Stream)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteBoolean
Writes Boolean to the specified node.
method WriteBoolean(name: String; value: Boolean)
void WriteBoolean(String name, Boolean value)
Sub WriteBoolean(name As String, value As Boolean)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteComplex (declared in Serializer)
method WriteComplex(name: String; value: ComplexType)
void WriteComplex(String name, ComplexType value)
Sub WriteComplex(name As String, value As ComplexType)
Parameters:
- name:
- value:
WriteCurrency
Writes Currency value to the specified node.
method WriteCurrency(name: String; value: Decimal)
void WriteCurrency(String name, Decimal value)
Sub WriteCurrency(name As String, value As Decimal)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteCustomEnum
Writes value of ICustomEnum the specified node.
method WriteCustomEnum(name: String; value: ICustomEnum)
void WriteCustomEnum(String name, ICustomEnum value)
Sub WriteCustomEnum(name As String, value As ICustomEnum)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteDateTime
Writes DateTime value to the specified node.
method WriteDateTime(name: String; value: DateTime)
void WriteDateTime(String name, DateTime value)
Sub WriteDateTime(name As String, value As DateTime)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteDecimal
Writes decimal value to the specified node.
method WriteDecimal(name: String; value: Decimal)
void WriteDecimal(String name, Decimal value)
Sub WriteDecimal(name As String, value As Decimal)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteDouble
Writes double value to the specified node.
method WriteDouble(name: String; value: Double)
void WriteDouble(String name, Double value)
Sub WriteDouble(name As String, value As Double)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteEnum
Writes specified enumeration value to the specified node.
method WriteEnum(name: String; value: Enum)
void WriteEnum(String name, Enum value)
Sub WriteEnum(name As String, value As Enum)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteExceptionDetails
Writes extra data of the given exception into the current node.
method WriteExceptionDetails(exception: Object; node: XmlNode)
void WriteExceptionDetails(Object exception, XmlNode node)
Sub WriteExceptionDetails(exception As Object, node As XmlNode)
Parameters:
- exception: An exception to write.
- node: A node to write the exception to.
WriteGenericArray
A name of the node to write to.
method WriteGenericArray(name: String; value: IList; format: StreamingFormat)
void WriteGenericArray(String name, IList value, StreamingFormat format)
Sub WriteGenericArray(name As String, value As IList, format As StreamingFormat)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
- format: Can be useful for several types of array's elements.
WriteGuid
Writes GUID value to the specified node.
method WriteGuid(name: String; value: Guid)
void WriteGuid(String name, Guid value)
Sub WriteGuid(name As String, value As Guid)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteInt32
Writes Int32 value to the specified node.
method WriteInt32(name: String; value: Int32)
void WriteInt32(String name, Int32 value)
Sub WriteInt32(name As String, value As Int32)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteInt64
Writes Int64 value to the specified node.
method WriteInt64(name: String; value: Int64)
void WriteInt64(String name, Int64 value)
Sub WriteInt64(name As String, value As Int64)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteNullableBoolean
method WriteNullableBoolean(name: String; value: Nullable<Boolean>)
void WriteNullableBoolean(String name, Nullable<Boolean> value)
Sub WriteNullableBoolean(name As String, value As Nullable<Boolean>)
Parameters:
- name:
- value:
WriteNullableCurrency
method WriteNullableCurrency(name: String; value: Nullable<Decimal>)
void WriteNullableCurrency(String name, Nullable<Decimal> value)
Sub WriteNullableCurrency(name As String, value As Nullable<Decimal>)
Parameters:
- name:
- value:
WriteNullableDateTime
method WriteNullableDateTime(name: String; value: Nullable<DateTime>)
void WriteNullableDateTime(String name, Nullable<DateTime> value)
Sub WriteNullableDateTime(name As String, value As Nullable<DateTime>)
Parameters:
- name:
- value:
WriteNullableDecimal
method WriteNullableDecimal(name: String; value: Nullable<Decimal>)
void WriteNullableDecimal(String name, Nullable<Decimal> value)
Sub WriteNullableDecimal(name As String, value As Nullable<Decimal>)
Parameters:
- name:
- value:
WriteNullableDouble
method WriteNullableDouble(name: String; value: Nullable<Double>)
void WriteNullableDouble(String name, Nullable<Double> value)
Sub WriteNullableDouble(name As String, value As Nullable<Double>)
Parameters:
- name:
- value:
WriteNullableEnum
method WriteNullableEnum(name: String; value: nullable Enum)
void WriteNullableEnum(String name, Enum? value)
Sub WriteNullableEnum(name As String, value As Enum?)
Parameters:
- name:
- value:
WriteNullableGuid
method WriteNullableGuid(name: String; value: Nullable<Guid>)
void WriteNullableGuid(String name, Nullable<Guid> value)
Sub WriteNullableGuid(name As String, value As Nullable<Guid>)
Parameters:
- name:
- value:
WriteNullableInt32
method WriteNullableInt32(name: String; value: Nullable<Int32>)
void WriteNullableInt32(String name, Nullable<Int32> value)
Sub WriteNullableInt32(name As String, value As Nullable<Int32>)
Parameters:
- name:
- value:
WriteNullableInt64
method WriteNullableInt64(name: String; value: Nullable<Int64>)
void WriteNullableInt64(String name, Nullable<Int64> value)
Sub WriteNullableInt64(name As String, value As Nullable<Int64>)
Parameters:
- name:
- value:
WriteObject (declared in Serializer)
This method is a wrapper for Write method. It defines a type and streaming format of passed object.
method WriteObject(name: String; value: Object)
void WriteObject(String name, Object value)
Sub WriteObject(name As String, value As Object)
Parameters:
- name:
- value:
WriteObjectData (declared in Serializer)
method WriteObjectData(value: Object)
void WriteObjectData(Object value)
Sub WriteObjectData(value As Object)
Parameters:
- value:
WriteToStream
Does nothing in this implementation.
method WriteToStream(stream: Stream)
void WriteToStream(Stream stream)
Sub WriteToStream(stream As Stream)
Parameters:
- stream: A stream to write to.
WriteUtf8String
Writes string vaule in UTF8 format to the specified node.
method WriteUtf8String(name: String; value: String)
void WriteUtf8String(String name, String value)
Sub WriteUtf8String(name As String, value As String)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteVariant
Writes Variant object to the specified node.
method WriteVariant(name: String; value: Object)
void WriteVariant(String name, Object value)
Sub WriteVariant(name As String, value As Object)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteWideString
Writes wide string value to the specified node.
method WriteWideString(name: String; value: String)
void WriteWideString(String name, String value)
Sub WriteWideString(name As String, value As String)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteXml
The format in which xml will be serialized depends on flag EncodedXml in SoapMessage.SerializationOptions. Xml will be serialized into WideString if flag is set, or inserted in soap document as Xml node if flag isn't set.
method WriteXml(name: String; value: XmlNode)
void WriteXml(String name, XmlNode value)
Sub WriteXml(name As String, value As XmlNode)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
WriteXsDateTime
Writes XsDateTime value to the specified node.
method WriteXsDateTime(name: String; value: XsDateTime)
void WriteXsDateTime(String name, XsDateTime value)
Sub WriteXsDateTime(name As String, value As XsDateTime)
Parameters:
- name: A name of the node to write to.
- value: An actual value to write to the node.
- SOAP Message
- SoapMessage
- SOAP Message Options