Deserialization and Serialization Details

SOAP/AM Server Development > Advanced Topics >

Deserialization and Serialization Details

Previous pageReturn to chapter overviewNext page

Deserialization is the process through which SOAP/AM Server converts an XML-formatted SOAP request into a application server request interprocess message. Conversely, serialization is the process through which SOAP/AM Server converts an application server reply interprocess message (IPM) to an XML-formatted SOAP response. Both of these conversions occur at runtime when a Web service method is invoked by a client application.

 

Headers and parameters supplied in SOAP requests must be appropriate for conversion to the type to which they are to be mapped; otherwise, a SOAP fault will occur during deserialization. Likewise, data contained in a server reply interprocess message must be of the type defined by the mapping for the reply; otherwise a SOAP fault will occur during serialization.

<element> element attributes

The stringPadding attribute controls the way elements of type "string" are treated when SOAP/AM Server converts request input parameters to server interprocess request messages ("deserialization") and server reply interprocess messages to SOAP response output parameters ("serialization"). A stringPadding value of "zeros" causes the string to be padded with zeros to the maximum field length (aka "null-terminated") in server request messages and expected to be zero-terminated (not necessarily padded) in the server reply message. A stringPadding value of "spaces" causes the string to be padded with spaces in the server request and expected to be padded with spaces in the server reply. It is usually easier to specify the stringPadding setting on the containing <type> or on the <server> that will use the type rather than on every string element. However, it may be useful to set stringPadding on a small number of elements to override the default for the entire <type> which applies to the remainder of the elements.

 

On deserialization, SOAP/AM Server will automatically calculate a value for the 'dependsOn' element based on the number of array elements present in the request. On serialization, SOAP/AM Server expects the dependsOn element to have been set correctly by the server. It serializes to the response only the number of array elements indicated by the dependsOn element.

 

On deserialization, SOAP/AM Server will automatically calculate a value for the 'sizeIs' element based on the size, in bytes, of the subject element in the request. On serialization, SOAP/AM Server expects the sizeIs element to have been set correctly by the server. It serializes to the response only the number of bytes indicated by the sizeIs element.