[Zope-CMF] XMLRPC + CMF = NoGo.

Martijn Pieters mj@digicool.com
Fri, 13 Apr 2001 19:06:57 +0200


On Fri, Apr 13, 2001 at 09:01:22AM -0400, Tres Seaver wrote:
> > I get a NotFound error (Traceback essentially useless, of
> > course), complaining about not being able to find "/RPC2".
> 
> I don't know of any symbol, 'RPC2', which would be in a stock
> Zope;  is this name mentioned by your 'index_html'?

'RPC2' is the default name of the XML-RPC handler in Frontier. It is the
default handler name if you don't specify anything other than a hostname
for the Server class. From xmlrpc.py:

  class Server:
      """Represents a connection to an XML-RPC server"""

      def __init__(self, uri, transport=None):
          # establish a "logical" server connection

          # get the url
          type, uri = urllib.splittype(uri)
          if type not in ("http", "https"):
              raise IOError, "unsupported XML-RPC protocol"
          self.__host, self.__handler = urllib.splithost(uri)
          if not self.__handler:
              self.__handler = "/RPC2"

          if transport is None:
              transport = Transport()
          self.__transport = transport

So, I suspect that you are not supplying a trailing slash after the
hostname. A quick python session:

  >>> import urllib 
  >>> urllib.splittype('http://www.libc.org/')
  ('http', '//www.libc.org/')
  >>> urllib.splithost('//www.libc.org/')
  ('www.libc.org', '/')
  >>> urllib.splithost('//www.libc.org')
  ('www.libc.org', '')

-- 
Martijn Pieters
| Software Engineer  mailto:mj@digicool.com
| Digital Creations  http://www.digicool.com/
| Creators of Zope   http://www.zope.org/
---------------------------------------------