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
Pieter Laeremans kirjutas L, 06.12.2003 kell 15:14:
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")
Do you have an one argument methiod called Zope/pyhello defined in your zope ?
---------------------------------------------------------
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 ?
Yo did get back bona fide XML RPC fault, so obviously Zope does support XML-RPC
I have zope version 2.6.2.
Am I doing something wrong ?
Probably
Any tips ?
Check the logs (under Zope's var/ directory) to see what your library tries to access. Read docs for xmlrpclib ;) --------------- Hannu
Hannu Krosing <hannu@tm.ee> writes:
Pieter Laeremans kirjutas L, 06.12.2003 kell 15:14:
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")
Do you have an one argument methiod called Zope/pyhello defined in your zope ?
in my / folder I have a method pyhello defined. regards, Pieter
Pieter Laeremans <pieter.laeremans@student.kuleuven.ac.be> writes:
Hannu Krosing <hannu@tm.ee> writes:
Pieter Laeremans kirjutas L, 06.12.2003 kell 15:14:
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")
Do you have an one argument methiod called Zope/pyhello defined in your zope ?
in my / folder I have a method pyhello defined.
It works just fine when I visit the following page with my browser : http://localhost:9673/pyhello?name=pieter regards, Pieter
Pieter Laeremans <pieter.laeremans@student.kuleuven.ac.be> writes:
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")
s.pyhello("Chui Tey") does the job ! Thanks Hannu for suggesting that I did something wrong :-) regards, Pieter
participants (2)
-
Hannu Krosing -
Pieter Laeremans