Using the current trunk r27366 (which is after #4014 fixed a related issue), I am having trouble with an implementation of web.guard wrapped XMLRPC. This is a new test implementation to expose both a soap and xmlrpc interface. SOAP works, but xmlrpc throws UnsupportedMethod POST.
Here is my test code, can anybody tell me if im doing something wrong? Again, /soap works, but /rpc2 freaks on the POST method being unavailable. ###### test-script.py from zope.interface import implements from twisted.internet import reactor from twisted.web.resource import IResource, Resource from twisted.web import server, guard from twisted.cred.portal import IRealm from twisted.python import log from zope.interface import implements from twisted.python import log from twisted.internet import reactor from twisted.web import server, resource, guard, xmlrpc, soap from twisted.cred.portal import IRealm, Portal from twisted.cred.checkers import InMemoryUsernamePasswordDatabaseDontUse import sys def getQuote(): return "Victory to the burgeois, you capitalist swine!" class XMLRPCQuoter(xmlrpc.XMLRPC): def xmlrpc_quote(self): return getQuote() class SOAPQuoter(soap.SOAPPublisher): def soap_quote(self): return getQuote() class WebServicesRealm(object): implements(IRealm) def requestAvatar(self, avatarId, mind, *interfaces): if resource.IResource in interfaces: node = resource.Resource() node.putChild("rpc2", XMLRPCQuoter()) node.putChild("soap", SOAPQuoter()) return resource.IResource, node, lambda: None raise NotImplementedError() if __name__ == "__main__": log.startLogging(sys.stdout) checker = [InMemoryUsernamePasswordDatabaseDontUse(foo='bar')] webServicesWrapper = guard.HTTPAuthSessionWrapper(Portal(WebServicesRealm(), checker), [guard.BasicCredentialFactory("test")]) reactor.listenTCP(9999, server.Site(webServicesWrapper)) reactor.run() ###### http://localhost:9999/soap *good* http://localhost:9999/rpc2 *bad; POST isnt an allowed method* Thanks, TWKiel
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python