XML-RPC problems after upgrade
I've just upgrade from 2.4.3 to 2.6. In the process, I've also changed some things (e.g., changed from SiteRoot/SiteAccess to VHM). My problem now is that XML-RPC calls aren't working any more. I always get a /RPC2 NotFound error. Here is the output of calling a simple python script: ################################333 python Python 2.1.3 (#4, May 23 2002, 15:13:21) [GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-110)] on linux2 Type "copyright", "credits" or "license" for more information. Welcome to Lazy Python. Type "help LazyPython" for help.
import xmlrpclib s = xmlrpclib.Server('http://www.samba-choro.com.br') s.testXMLRPC()
Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.1/site-packages/xmlrpclib.py", line 986, in __call__ return self.__send(self.__name, args) File "/usr/local/lib/python2.1/site-packages/xmlrpclib.py", line 1239, in __request verbose=self.__verbose File "/usr/local/lib/python2.1/site-packages/xmlrpclib.py", line 1037, in request return self._parse_response(h.getfile(), sock) File "/usr/local/lib/python2.1/site-packages/xmlrpclib.py", line 1138, in _parse_response return u.close() File "/usr/local/lib/python2.1/site-packages/xmlrpclib.py", line 703, in close raise apply(Fault, (), self._stack[0]) 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: http://www.samba-choro.com.br/RPC2 \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 HTML source for this page.\n \n\n If the error persists please contact the site maintainer.\n Thank you for your patience.\n \n \n '> ########################### If I try to call other sites with Zope 2.6.0 (e.g. Zope.org) I also get the same XMLRPC error (/RPC2 NotFound). Does anybody knows how can I fix it? I'm running Zope behind Apache, using Virtual Host Monster. regards, -- Paulo Eduardo Neves Agenda do Samba & Choro, o boteco virtual do samba e choro http://www.samba-choro.com.br
Paulo Eduardo Neves writes:
I've just upgrade from 2.4.3 to 2.6. In the process, I've also changed some things (e.g., changed from SiteRoot/SiteAccess to VHM). My problem now is that XML-RPC calls aren't working any more. I always get a /RPC2 NotFound error. Here is the output of calling a simple python script:
################################333 python Python 2.1.3 (#4, May 23 2002, 15:13:21) [GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-110)] on linux2 Type "copyright", "credits" or "license" for more information. Welcome to Lazy Python. Type "help LazyPython" for help.
import xmlrpclib s = xmlrpclib.Server('http://www.samba-choro.com.br') s.testXMLRPC() Try:
s = xmlrpclib.Server('http://www.samba-choro.com.br/testXMLRPC') s() Dieter
Em Quarta 18 Dezembro 2002 21:03, Dieter Maurer escreveu:
Paulo Eduardo Neves writes:
I've just upgrade from 2.4.3 to 2.6. In the process, I've also changed some things (e.g., changed from SiteRoot/SiteAccess to VHM). My problem now is that XML-RPC calls aren't working any more. I always get a /RPC2 NotFound error. Here is the output of calling a simple python script:
################################333 python Python 2.1.3 (#4, May 23 2002, 15:13:21) [GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-110)] on linux2 Type "copyright", "credits" or "license" for more information. Welcome to Lazy Python. Type "help LazyPython" for help.
import xmlrpclib s = xmlrpclib.Server('http://www.samba-choro.com.br') s.testXMLRPC()
Try:
s = xmlrpclib.Server('http://www.samba-choro.com.br/testXMLRPC') s()
Now, instead of a NotFound with the resource /RC2, I've got an unspecied not found error. The url is working, it is a simple python script, you can click on it. Does anyone got XML-RPC working in version 2.6.0? thanks for your answer, -- Paulo Eduardo Neves Agenda do Samba & Choro, o boteco virtual do samba e choro http://www.samba-choro.com.br
I am using xmlrpc with Zope 2.6 with no problems. I am calling a script that calls a ZSQL method from a cron job with the following code: from xmlrpclib import Server server = Server('http://localhost:8080/Blah/WebService/') results = server.sql28Cron() print results In looking at this code vs. the code you are running I notice that the only difference is that the text defining my server name ends with a '/'. I'd try adding the '/' and see what happens... Kevin -----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Paulo Eduardo Neves Sent: Wednesday, December 18, 2002 9:59 PM To: zope@zope.org Subject: Re: [Zope] XML-RPC problems after upgrade Em Quarta 18 Dezembro 2002 21:03, Dieter Maurer escreveu:
Paulo Eduardo Neves writes:
I've just upgrade from 2.4.3 to 2.6. In the process, I've also changed some things (e.g., changed from SiteRoot/SiteAccess to VHM). My problem now is that XML-RPC calls aren't working any more. I always get a /RPC2 NotFound error. Here is the output of calling a simple python script:
################################333 python Python 2.1.3 (#4, May 23 2002, 15:13:21) [GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-110)] on linux2 Type "copyright", "credits" or "license" for more information. Welcome to Lazy Python. Type "help LazyPython" for help.
import xmlrpclib s = xmlrpclib.Server('http://www.samba-choro.com.br') s.testXMLRPC()
Try:
s = xmlrpclib.Server('http://www.samba-choro.com.br/testXMLRPC') s()
Now, instead of a NotFound with the resource /RC2, I've got an unspecied not found error. The url is working, it is a simple python script, you can click on it. Does anyone got XML-RPC working in version 2.6.0? thanks for your answer, -- Paulo Eduardo Neves Agenda do Samba & Choro, o boteco virtual do samba e choro http://www.samba-choro.com.br _______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Em Quinta 19 Dezembro 2002 01:22, Kevin Carlson escreveu:
In looking at this code vs. the code you are running I notice that the only difference is that the text defining my server name ends with a '/'. I'd try adding the '/' and see what happens...
Yes, this was the problem. I've just discovered it in xmlrpclib docs:
print xmlrpclib.ServerProxy.__doc__ uri [,options] -> a logical connection to an XML-RPC server
uri is the connection point on the server, given as scheme://host/target. The standard implementation always supports the "http" scheme. If SSL socket support is available (Python 2.0), it also supports "https". If the target part and the slash preceding it are both omitted, "/RPC2" is assumed. The following options can be given as keyword arguments: transport: a transport factory encoding: the request encoding (default is UTF-8) All 8-bit strings passed to the server proxy are assumed to use the given encoding. It looks like that ServerProxy is now the correct way to use the lib. They probably have a reason for breaking old code, but this default appending of /RC2 is really weird. thanks for all the answers, -- Paulo Eduardo Neves Agenda do Samba & Choro, o boteco virtual do samba e choro http://www.samba-choro.com.br
On Fri, Dec 20, 2002 at 03:21:27AM -0200, Paulo Eduardo Neves wrote:
It looks like that ServerProxy is now the correct way to use the lib. They probably have a reason for breaking old code, but this default appending of /RC2 is really weird.
as stated in another email /RPC2 is the historical default for XML-RPC supporting servers. Zope is really an exception in that it's whole URL space is XML-RPC enabled. -- Martijn Pieters | Software Engineer mailto:mj@zope.com | Zope Corporation http://www.zope.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
On Tue, Dec 17, 2002 at 11:15:44AM -0200, Paulo Eduardo Neves wrote:
I've just upgrade from 2.4.3 to 2.6. In the process, I've also changed some things (e.g., changed from SiteRoot/SiteAccess to VHM). My problem now is that XML-RPC calls aren't working any more. I always get a /RPC2 NotFound error. Here is the output of calling a simple python script:
################################333 python Python 2.1.3 (#4, May 23 2002, 15:13:21) [GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-110)] on linux2 Type "copyright", "credits" or "license" for more information. Welcome to Lazy Python. Type "help LazyPython" for help.
import xmlrpclib s = xmlrpclib.Server('http://www.samba-choro.com.br') s.testXMLRPC()
xmlrpclib defaults to the path /RPC2, which is the Frontier default XML-RPC server path (Frontier was the first sofwtare to implement XML-RPC). Add a slash to your URL and things will work just fine. -- Martijn Pieters | Software Engineer mailto:mj@zope.com | Zope Corporation http://www.zope.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
participants (5)
-
Dieter Maurer -
Kevin Carlson -
Martijn Pieters -
Paulo Eduardo Neves -
Paulo Eduardo Neves