[Zope-dev] z3c.jsonrpc in GroupServer, a Zope 2 project

2013-08-28 Thread Bill Bushey
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.

You can see the code for my attempted implementation at
https://source.iopen.net/groupserver/gs.group.member.invite.json/files/48e83035eee1a485e641a3290a295ed4d6355c58/gs/group/member/invite/json/.
Don't worry if you encounter an SSL certificate warning, that's pretty
normal.

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).

I've attempted to use zope.testbrowser as described at
https://pypi.python.org/pypi/z3c.jsonrpc/#testing with slight variations:

 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)

api_rpc_test.py is definitely being read during the launch of GroupServer,
and the whole application is able to load. I'm also able to execute all of
the code in the section at
https://pypi.python.org/pypi/z3c.jsonrpc/#jsonrpc-proxy.

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
___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] zope-tests - OK: 12

2013-08-28 Thread Zope tests summarizer
This is the summary for test reports received on the 
zope-tests list between 2013-08-27 00:00:00 UTC and 2013-08-28 00:00:00 UTC:

See the footnotes for test reports of unsuccessful builds.

An up-to date view of the builders is also available in our 
buildbot documentation: 
http://docs.zope.org/zopetoolkit/process/buildbots.html#the-nightly-builds

Reports received


   Successful - zopetoolkit_trunk - Build # 370
   winbot / ZODB_dev py_265_win64
   winbot / ZODB_dev py_270_win32
   winbot / ZODB_dev py_270_win64
   winbot / ztk_10 py_254_win32
   winbot / ztk_10 py_265_win32
   winbot / ztk_10 py_265_win64
   winbot / ztk_11 py_254_win32
   winbot / ztk_11 py_265_win32
   winbot / ztk_11 py_265_win64
   winbot / ztk_11 py_270_win32
   winbot / ztk_11 py_270_win64

Non-OK results
--

___
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )