The following code does not work:
root = resource.Resource()
srv = XMLRPCGeocoder()
root.putChild("geospatial/geocoder/XMLRPC", srv)
When I attempt to access the service, twisted gives the following error:
Request failed: <ProtocolError for localhost:8080/geospatial/geocoder/XMLRPC: 404 Not Found>
If I use the following code, and change the client to point only to localhost:8080/XMLRPC, it _does_ work:
root.putChild("XMLRPC", srv)
The docs say something about using putChild.putChild... so I tried the following:
root.putChild("geospatial", None).putChild("geocoder", None).putChild("XMLRPC", srv)
The problem is Resource.putChild _always_ returns None! Even the following, which is the working version:
print root.putChild("XMLRPC", srv) # Prints None too
Looking at twisted.web.resource.Resource's source code, all it does is add the path to a hash array and returns nothing...
It seems like such a simple thing to do! Thanks for your help!