Re: Getting xml-rpc and w.bloggar to work
Wari Wahab <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <1060245198.27723.47.camel@minisync> |
On Thu, 2003-08-07 at 13:25, David Ascher wrote:
> I'm a bit puzzled as to how to get the xmlrpc interface to work.
> I'm using w.bloggar to test it.
I have never tested blogger.py (and the whole pyblosxom lot) on Windows,
and when looking at your XML output, it pretty much means that I've got
to work on it even more. BTW, are you using 0.8rc1?
> Summary: 1) authentication doesn't seem to work
> 2) even if I disable authentication, w.bloggar is unhappy.
Hmm, the basic litmus test on this would be to use the standard python
xmlrpclib, just to know if things works. w.bloggar can be a nightmare to
work with, as the errors I've got from them is never informative enough.
And like what Mark Pilgrim said, "People who said that XMLRPC is easier
than REST have never debugged XMLRPC before"
> Prelude:
> The relevant bits of my config.py:
> xmlrpc['usernames'] = {'david': '...'}
> py['xmlrpc_plugin_dirs'] = ['d:/apps/pyblosxom_xmlrpcplugins']
> py['load_xmlrpc_plugins'] = ['blogger']
Looks right to me, BTW, you also need py['base_url'] set up to get
things working a bit.
What happens when you go to a python shell and do the following?
It should go somewhat like this:
[wari@sync xmlrpc]$ python
Python 2.3 (#1, Aug 5 2003, 08:27:10)
[GCC 3.2 20020903 (Red Hat Linux 8.0 3.2-7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from xmlrpclib import Server
>>> s = Server('http://roughingit.wari.org/RPC2')
>>> s.blogger.getUsersBlogs('', 'someuser', 'somepassword')
[{'url': 'http://roughingit.wari.org/',
'blogid': '/',
'blogName': '/'},
{'url': 'http://roughingit.wari.org/about/',
'blogid': '/about/',
'blogName': '/about/'}[[.SNIPPED.]]]
Looking at your XML, it seems:
1. py['base_url'] is not setup
2. URL becomes invalid with all that \\ instead of /
> Question: what "blog tool" should I be configuring w.bloggar to use?
The Custom or generic one will do. I got a mini-howto at
http://www.bluesock.org/~willg/pyblosxom-dev/msg00241.html which I plan
to put in the wiki one day
> 1) Authentication:
> I get authentication failures in Pyblosxom/xmlrpc.py (the
> username and passwords being sent in are always '', even though
> I think I've configured w.bloggar correctly).
I will have to install pyblosxom on windows to figure this out. Seems
like I have a lot to do to fix this. All my installations on unix and
tests with w.bloggar (and Jericho) works. This will take a while. BTW,
what web server are you using?
> 2) If I disable the authentication (by making xmlrpc.py:authenticate()
> a noop), then I get w.bloggar complaining that tags aren't being closed,
> even though it "looks" as though the list of topics is being sent back
> properly and is valid XML:
It is valid XML (Fredrik Lundh will kill you if it isn't :) Like I said
earlier, wbloggar error messages are not to be trusted.
> Thanks for any advice.
Conclusion, this is something I have to work on, hence will take me a
while to get it working, it'll be helpful to know what webserver you are
using, and if you're using IIS, the chances of me fixing it would be
really really remote, I'm not sure how to setup IIS.
If I'm not wrong, you're using Activestate python, version 2.2.2 right
(when's 2.3 coming out?)
Then again, if you already got pyblosxom working and it's got PATH_INFO
right, you are probably using apache. Most of the fixes would actually
involve massaging all the Windows representations of \ to / and back (to
w.bloggar, convert \ to /, and from wbloggar, convert / to \)
I'll also have to see why authentication doesn't work on Windows, weird.
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01