SOAP Web services serialize data as XML documents (the SOAP message). This document has to be created from a custom data structure, which is called serializing. The receiver of a SOAP message parses it with an XML parser back into the custom data structure. During the testing of the IGUANA OPC server, it was observed that this parsing and serializing took relatively long compared to other tasks. Therefore all steps in this serializing/parsing procedure were timed to examine this issue. Figure 72 depicts the typical steps in serializing and parsing SOAP messages with ZSI.
The duration of 1000 repetitions of each step was measured. Three different SOAP messages were tested to rule out side-effects. Moreover, ZSI supports the usage of three different XML parsers, which were also compared in the test152 The result of this test can be found in figure 73.
It can be observed that the choice of the parser has a massive speed impact. Obviously the first parser - which is the default in ZSI - is very inefficient, being approximately 50 times slower than the fastest parser. Moreover, it can be seen that filling/reading data to/from the ZSI typecodes are a lot faster than other steps. It is also interesting that serializing a SOAP message takes slightly longer than parsing when an efficient parser is used. As serializing needs much less effort than parsing a SOAP message, code optimizations that speed up the serializer are probably possible153.
When an efficient parser is used, the performance of ZSI seems to be reasonable: Parsing and serializing a common SOAP message, which is needed for any client/server communication, is in the millisecond range on the PC hardware of the test setup.