[Zope] xml rpc

Pieter Laeremans pieter.laeremans at student.kuleuven.ac.be
Sat Dec 6 08:14:47 EST 2003


>From the document at http://www.zope.org/Members/teyc/howxmlrpc  
I deduce that zope has the ability to work as an xmlrpc server.

However when I try it using the following code (because I didn't make
a test folder and because zope runs on port 9673 on my system)

--------------------------------------------------------
#!/usr/bin/python

import xmlrpclib

s=xmlrpclib.Server("http://localhost:9673")
print s.Zope.pyhello("Chui Tey")

---------------------------------------------------------

I get the following error:


---------------------------------------------------------
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/tmp/python-1067nTO.py", line 8, in ?
    print s.Zope.pyhello("Chui Tey")
  File "/usr/lib/python2.3/xmlrpclib.py", line 1029, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.3/xmlrpclib.py", line 1316, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.3/xmlrpclib.py", line 1080, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib/python2.3/xmlrpclib.py", line 1219, in _parse_response
    return u.close()
  File "/usr/lib/python2.3/xmlrpclib.py", line 742, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault -2: 'Unexpected Zope error value: NotFound -  \n \n\n \n \n \n\n \n   Site Error \n   An error was encountered while publishing this resource.\n   \n    Resource not found  \n\n  Sorry, the requested resource does not exist. Check the URL and try again.   Resource:  RPC2\nPOST \n   \n\n   Troubleshooting Suggestions \n\n   \n   The URL may be incorrect. \n   The parameters passed to this resource may be incorrect. \n   A resource that this resource relies on may be\n      encountering an error. \n   \n\n   For more detailed information about the error, please\n  refer to the error log.\n   \n\n   If the error persists please contact the site maintainer.\n  Thank you for your patience.\n   \n  \n '>

----------------------------------------------------------------------

Does this mean that zope doesn't support xmlrpc ?  

I have zope version 2.6.2.

Am I doing something wrong ?

Any tips ?

Thanks in advance.

kind regards,

Pieter




More information about the Zope mailing list