SOAP parsing speeds

Alan Kennedy alanmk at hotmail.com
Tue May 27 17:10:35 EDT 2003


Jamie wrote:

> I've tried versions 0.9.7, 0.9.8 and 0.10.1 of the SOAP.py module by
> Cayce Ullman, Brian Matthews. I've also tried the ZSI module which
> pretty much bombs when it tries to parse the 1.4 MB SOAP envelope.

The problem with some SOAP implementations is that they build a DOM tree
for the incoming document. I don't know if this is the case for SOAP.py
or ZSI. 

DOM trees can really make memory requirements balloon, possibly up to
100 times the size of the XML doc in bytes.

Note that in some situations, sending such a large SOAP document could
be considered a Denial-Of-Service attack, since so much server resources
are used to service the call.

Apache Axis is more sophisticated in this regard, in that it parses
incoming documents using SAX, and builds an object model (from your
classes) dynamically, based on the incoming document. So far fewer
server resources are required.

Are there any of the python SOAP modules that do something similar? It
should be much easier to do this kind of dynamic invocation in python
than in java.

You could combine Jython and Apache Axis, if jython were an acceptable
solution to you. Possibly worth considering for such large documents.

HTH,

-- 
alan kennedy
-----------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan:              http://xhaus.com/mailto/alan




More information about the Python-list mailing list