> Betreff: [Zope3-Users] Issue with xmlrpc call to zope3 xmlrpc
> view hanging,until original call interupted.
> I wonder if anyone can shed some light on a problem I am
> having with xmlrpc calls to a zope3 server.
> I am running zope3 from buildout on python2.5 on unbuntu.
> I have a view defined for xmlrpc (zope.app.publisher 3.5.0)
> the same view is also defined for jsonrpc using z3c.jsonrpc
> I am testing with xmlrpclib and the z3c.jsonrpc proxy
> Everything works fine when testing the jsonrpc call. However
> when performing the xmlrpc call the call hangs, until I
> either kill the server, or the ctl ^c the test.
> I know the zcml registration for the view is correct as I end
> up in the method of the view on the server,because I can put
> import pdb
> in the method in question, and when I kill the client socket
> the server thread advances to the set_trace call and I get
> the stacktrace on the client as follows
> Traceback (most recent call last):
> File "bin/python", line 136, in <module>
> File "x.py", line 6, in <module>
> print x.iba.stores.name()
> File "/usr/lib/python2.5/xmlrpclib.py", line 1147, in __call__
> return self.__send(self.__name, args)
> File "/usr/lib/python2.5/xmlrpclib.py", line 1437, in __request
> File "/usr/lib/python2.5/xmlrpclib.py", line 1185, in request
> errcode, errmsg, headers = h.getreply()
> File "/usr/lib/python2.5/httplib.py", line 1199, in getreply
> response = self._conn.getresponse()
> File "/usr/lib/python2.5/httplib.py", line 928, in getresponse
> File "/usr/lib/python2.5/httplib.py", line 385, in begin
> version, status, reason = self._read_status()
> File "/usr/lib/python2.5/httplib.py", line 343, in _read_status
> line = self.fp.readline()
> File "/usr/lib/python2.5/socket.py", line 331, in readline
> data = recv(1)
> It seems as if the publisher for xmlrpc is not reading
> everything from the socket.
> I have been using xmlrpclib for years against zope2 and never
> experienced sort of problem, and my current python 2.4 and
> 2.5 xmlrpclib in ubuntu works fine against existing zope2 servers.
> I am using paste.httpserver .
> Any ideas, things I could try to diagnose the problem?
As far as I understand the problem is at the server side
if you receive a xmlrpc request and not if you use a
XMLRPC client and will send a request.
The z3c.jsonrpc doesn't use anything similar then the xmlrpclib
implementation. I mean the jsonrpc and xmlrpc implemenation are
not comparable for that problem.
The z3c.json package offers a JSON python client. Only this
client uses similar patterns then the xmlrpclib package.
Zope3-users mailing list