Log message for revision 89972: A minor patch to cause incoming SOAP requests to have their XML stashed for later interpretation by a SOAP-aware view. Without this patch SOAP requests fall into the XML-RPC logic and cause errors. This patch does not add significant overhead nor introduce new functionality other than making it possible to cleanly add-in a 3rd party SOAP parser for those who want it. This technique is being used with views using a small wrapper of soaplib and a @soapmethod decorator, outside the Zope SVN.
Changed: U Zope/trunk/lib/python/ZPublisher/HTTPRequest.py -=- Modified: Zope/trunk/lib/python/ZPublisher/HTTPRequest.py =================================================================== --- Zope/trunk/lib/python/ZPublisher/HTTPRequest.py 2008-08-18 14:50:46 UTC (rev 89971) +++ Zope/trunk/lib/python/ZPublisher/HTTPRequest.py 2008-08-18 16:04:20 UTC (rev 89972) @@ -431,8 +431,11 @@ meth=None fs=ZopeFieldStorage(fp=fp,environ=environ,keep_blank_values=1) if not hasattr(fs,'list') or fs.list is None: + if environ.has_key('HTTP_SOAPACTION'): + # Stash XML request for interpretation by a SOAP-aware view + other['SOAPXML'] = fs.value # Hm, maybe it's an XML-RPC - if (fs.headers.has_key('content-type') and + elif (fs.headers.has_key('content-type') and 'text/xml' in fs.headers['content-type'] and method == 'POST'): # Ye haaa, XML-RPC! _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins