Hello,
I am trying to use z3c.jsonrpc to write an endpoint in GroupServer (
http://groupserver.org/), an listserv/web forum hybrid built on Zope 2. However, it seems that the JSON server is not handling application/json requests, and I can not figure out why.
api_rpc_test.py in particular contains the class that is my attempt to implement a JSON-RPC endpoint. It started off as a zope.formlib form, so there's still vestigial methods form that; invite is the only real method of interest.
I'm able to start GroupServer with the gs.group.member.invite.json as it is above. However, when I attempt to invoke the invite method via JSON-RPC:
curl -i -X POST -H "Content-Type: application/json" -H "Accept: application/json'" -d '{"jsonrpc": "2.0", "method": "invite", "params": {"foo": "bar"}, "id": 1}'
http://localhost/groups/example_group/
the response I receive is the HTML I would receive from a standard request to that address (note: /groups/example_group/ implements gs.group.base.interfaces.IGSGroupMarker).
>>> from zope.testbrowser.testing import Browser
>>> browser = Browser()
>>> siteURL = '
http://samus/groups/example_group'
>>> browser.post(siteURL + '/content', "{'method':'hello', 'id':1}", content_type='application/json')
The result of this is :zope.configuration.exceptions.ConfigurationError: No registered publisher found for (POST/application/json)
I'm not sure what else to do, nor am I entirely sure what is wrong. I'd appreciate any help anybody can offer on this.
Thanks,
Bill