[Zope] Cannot process SOAP requests

Ed Leafe ed@leafe.com
Sun, 12 Jan 2003 10:24:25 -0500


	I'm trying to implement a simple handler for SOAP requests. This is  
for an interface required by a client, so the choice of SOAP over  
XML-RPC, etc., is nothing I can change.

	In order to figure out the way that such a request would be formatted,  
I added the following line to the handler script:

context.recordRequest(req=context.REQUEST)

"recordRequest" is a Z SQL Method that inserts the passed string into a  
log database. I then created a simple WSDL that pointed to my Zope  
handler, and invoked it using the Generic SOAP client tool available at  
http://www.soapclient.com/soaptest.html. The request was recorded, but  
none of the SOAP data was visible in the request! Here's what got  
stored in the log:

<h3>form</h3><table></table><h3>cookies</h3><table></table><h3>lazy  
items</h3><table><tr valign="top"  
align="left"><th>SESSION</th><td>&lt;bound method  
SessionDataManager.getSessionData of &lt;SessionDataManager instance at  
8b6c7c0&gt;&gt;</td></tr></table><h3>other</h3><table><tr valign="top"  
align="left"><th>AUTHENTICATION_PATH</th><td>''</td></tr><tr  
valign="top"  
align="left"><th>TraversalRequestNameStack</th><td>[]</td></tr><tr  
valign="top"  
align="left"><th>VirtualRootPhysicalPath</th><td>('',)</td></tr><tr  
valign="top"  
align="left"><th>URL</th><td>'http://leafe.com/MyTestWS'</td></tr><tr  
valign="top" align="left"><th>PUBLISHED</th><td>&lt;PythonScript at  
/MyTestWS&gt;</td></tr><tr valign="top"  
align="left"><th>SERVER_URL</th><td>'http://leafe.com'</td></tr><tr  
valign="top" align="left"><th>AUTHENTICATED_USER</th><td>Anonymous  
User</td></tr><tr valign="top"  
align="left"><th>traverse_subpath</th><td>[]</td></tr><tr valign="top"  
align="left"><th>URL0</th><td>http://leafe.com/MyTestWS</td></tr><tr  
valign="top"  
align="left"><th>URL1</th><td>http://leafe.com</td></tr><tr  
valign="top"  
align="left"><th>BASE0</th><td>http://leafe.com</td></tr><tr  
valign="top"  
align="left"><th>BASE1</th><td>http://leafe.com</td></tr><tr  
valign="top"  
align="left"><th>BASE2</th><td>http://leafe.com/MyTestWS</td></tr></ 
table><h3>environ</h3><table><tr valign="top"  
align="left"><th>SCRIPT_NAME</th><td>''</td></tr><tr valign="top"  
align="left"><th>SERVER_SOFTWARE</th><td>'Zope/(Zope 2.6.0 (binary  
release, python 2.1, linux2-x86), python 2.1.3, linux2)  
ZServer/1.1b1'</td></tr><tr valign="top"  
align="left"><th>channel.creation_time</th><td>1042309538</td></tr><tr  
valign="top"  
align="left"><th>SERVER_PROTOCOL</th><td>'HTTP/1.1'</td></tr><tr  
valign="top" align="left"><th>SERVER_PORT</th><td>'8080'</td></tr><tr  
valign="top"  
align="left"><th>PATH_INFO</th><td>'/MyTestWS'</td></tr><tr  
valign="top"  
align="left"><th>HTTP_HOST</th><td>'leafe.com:8080'</td></tr><tr  
valign="top"  
align="left"><th>REQUEST_METHOD</th><td>'POST'</td></tr><tr  
valign="top"  
align="left"><th>PATH_TRANSLATED</th><td>'/MyTestWS'</td></tr><tr  
valign="top"  
align="left"><th>HTTP_MAX_FORWARDS</th><td>'10'</td></tr><tr  
valign="top" align="left"><th>CONTENT_TYPE</th><td>'text/xml;  
charset="UTF-8"'</td></tr><tr valign="top"  
align="left"><th>HTTP_X_FORWARDED_HOST</th><td>'www.leafe.com'</td></ 
tr><tr valign="top"  
align="left"><th>HTTP_X_FORWARDED_FOR</th><td>'63.50.145.198'</td></ 
tr><tr valign="top"  
align="left"><th>REMOTE_ADDR</th><td>'24.95.211.16'</td></tr><tr  
valign="top"  
align="left"><th>SERVER_NAME</th><td>'leafe.com'</td></tr><tr  
valign="top"  
align="left"><th>HTTP_X_FORWARDED_SERVER</th><td>'leafe.com'</td></ 
tr><tr valign="top"  
align="left"><th>GATEWAY_INTERFACE</th><td>'CGI/1.1'</td></tr><tr  
valign="top"  
align="left"><th>HTTP_SOAPACTION</th><td>'"http://tempuri.org/action/ 
MyTestWS.SearchSubjectLinks"'</td></tr><tr valign="top"  
align="left"><th>CONTENT_LENGTH</th><td>'480'</td></tr></table>

	There is nothing listed under the "form" section - that's where the  
XML request should be, right? And the CONTENT-LENGTH certainly suggests  
that something was sent, but I can't see it anywhere in the request.

	How do I access the posted XML from the SOAP request?

      ___/
     /
    __/
   /
  ____/
  Ed Leafe
  http://leafe.com/
  http://opentech.leafe.com