Hi,

Unfortunately I've just hit googleblanks and brick walls on this one.  To
begin with I created a simple product which uses a page template to return
an xml packet.  It's possible to set the content-type of the response to
text/xml, and when you request the page through a browser (i.e. a GET
request) you get back a nice XML packet.

So far so good...

However SOAP uses POST requests with text/xml data, and this is where I ran
aground.  Whenever I Post text/xml soap packets to Plone, I get a crash in
the XMLRPCLIB.py module.  

I've been doing a lot of tracing with pdb, and what I've found is that the
Publishing architecture at lib/python/ZPublisher/HTTPRequest.py(406) is
making some bad decisions.  It effectively decides that anything which is
POST text/xml data must be XMLRPC, and so dives into the XMLRPCLIB which
duly crashes because my data is a SOAP packet and not legal XMLRPC.

I came across the IPublicationRequestFactory interface which is supposed
allow you to register different request publishers, but as far as I can tell
the publishers supplied in Plone aren't being called - let alone the custom
one I registered.

Lastly, I thought I needed to switch to the wsgi server instead of the
standard zope server, but the wsgi server doesn't seem to work (see
http://www.nabble.com/WSGIPublisher-and-Five-tf3787026s6741.html#a10709639).

At this stage it's looking like a modification to the HTTPRequest.py code is
required so that it doesn't go down the XMLRPC path without some more
extensive testing.

Tim
-- 
View this message in context: 
http://www.nabble.com/Building-a-web-service-layer-into-Plone3-tf4717732s20094.html#a13604651
Sent from the Product Developers mailing list archive at Nabble.com.


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to