[Zope] Problem with POST and text/xml

Jonathan (dev101) dev101 at magma.ca
Fri Jul 10 15:24:20 EDT 2009


I need to support a third party web service (which is not within my control) 
that wants to send xml data to my zope server (Zope 2.9.2 running on Redhat 
linux).

When Zope receives a POST request with a Content-Type of text/xml it assumes 
that it is an xmlrpc call (which it is not - it is just passing xml data 
within the POST request).

Is there a way to get Zope to turn off this "xmlrpc assumption" so that my 
zope external method can process the xml data that is being passed?


Thanks,

Jonathan


P.S.  details of a wget session that illustrate the error being generated 
follows:

Setting --header (header) to Content-Type: text/xml
Setting --post-data (postdata) to <?xml version="1.0" encoding="ISO-8859-1" 
?>
<bulkMtNotification>
  <transactionId>235006</transactionId>
  <triggerId>1160</triggerId>
  <message>test #27</message>
  <date>2007-09-14 15:52:59</date>
  <phoneNumber>+11234567890</phoneNumber>
  <carrierId>26</carrierId>
  <carrierName>Sprint</carrierName>
  <shortCode>55555</shortCode>
 </bulkMtNotification>
DEBUG output created by Wget 1.10.2 (Red Hat modified) on linux-gnu.

--16:12:28--  http://192.168.123.2:8080/Coz/Process3Ci
           => `Process3Ci.1'
Connecting to 192.168.123.2:8080... connected.
Created socket 3.
Releasing 0x0000000000638c60 (new refcount 0).
Deleting unused 0x0000000000638c60.

---request begin---
POST /Coz/Process3Ci HTTP/1.0
User-Agent: Wget/1.10.2 (Red Hat modified)
Accept: */*
Host: 192.168.123.2:8080
Connection: Keep-Alive
Content-Type: text/xml
Content-Length: 390

---request end---
[POST data: <?xml version="1.0" encoding="ISO-8859-1" ?>
<bulkMtNotification>
  <transactionId>235006</transactionId>
  <triggerId>1160</triggerId>
  <message>test #27</message>
  <date>2007-09-14 15:52:59</date>
  <phoneNumber>+11234567890</phoneNumber>
  <carrierId>26</carrierId>
  <carrierName>Sprint</carrierName>
  <shortCode>55555</shortCode>
 </bulkMtNotification>]
HTTP request sent, awaiting response...
---response begin---
HTTP/1.0 500 Internal Server Error
Server: Zope/(Zope 2.9.2-, python 2.4.2, linux2) ZServer/1.1
Date: Fri, 10 Jul 2009 20:12:28 GMT
Bobo-Exception-Line: 742
Content-Length: 849
Bobo-Exception-Value: See the server error log for details
Content-Type: text/html; charset=iso-8859-15
Bobo-Exception-Type: ResponseError
Connection: Keep-Alive
Bobo-Exception-File: xmlrpclib.py

---response end---
500 Internal Server Error
Registered socket 3 for persistent reuse.




More information about the Zope mailing list