tonybaldwin (
tonybaldwin) wrote2010-04-06 10:46 am
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Entry tags:
xmlrpc posting with Xpostulate
Okay...I've started to hack up the xmlrpc functions.
First, I had to replace all "<" and ">" in html tags in a post with"<" and ">",
and then, I have basically just handwritten out a relevant xml file.
Which looks like this:
<?xml version="1.0"?><methodCall><methodName>LJ.XMLRPC.postevent</methodName><params><param><value><struct><member><name>username</name><value><string>tonytraductor</string></value></member><member><name>password</name><value><string>XXXXXXXX</string></value></member><member><name>subject</name><value><string>xmlrpc posting</string></value></member><member><name>lineendings</name><value><string>pc</string><value></member><member><name>year</name><value><int>2010</int></value></member><member><name>mon</name><value><int>04</int></value></member><member><name>day</name><value><int>06</int></value></member><member><name>hour</name><value><int>10</int></value></member><member><name>min</name><value><int>46</int></value></member><member><name>prop_current_location</name><value><string>127.0.0.1</string></value></member><member><name>propr_current_mood</name><value><string>focused</string></value></member><member><name>prop_taglist</name><value><string>xmlrpc, xpostulate, wordpress, livejournal, dreamwidth, insanejournal</string></value></member><member><name>prop_currentmusic</name><value><string>none</string></value></member><member><name>userjournal</name><value><string>which journal?</string></value></member><member><name>event</name><value><string>Okay...I've started to hack up the xmlrpc functions.
First, I had to replace all "<" and ">" in html tags in a post with "<" and ">",
and then, I have basically just handwritten out a relevant xml file.
</string></value></member></struct></value></param></params></methodCall>
What I haven't done is tried to send such a file to a server, yet...
I'm not sure if the posting method has to be different from a flat post, in terms of simply sending this file as the post data...
More work...
But, hey, I'm working on it!
First, I had to replace all "<" and ">" in html tags in a post with"<" and ">",
and then, I have basically just handwritten out a relevant xml file.
Which looks like this:
<?xml version="1.0"?><methodCall><methodName>LJ.XMLRPC.postevent</methodName><params><param><value><struct><member><name>username</name><value><string>tonytraductor</string></value></member><member><name>password</name><value><string>XXXXXXXX</string></value></member><member><name>subject</name><value><string>xmlrpc posting</string></value></member><member><name>lineendings</name><value><string>pc</string><value></member><member><name>year</name><value><int>2010</int></value></member><member><name>mon</name><value><int>04</int></value></member><member><name>day</name><value><int>06</int></value></member><member><name>hour</name><value><int>10</int></value></member><member><name>min</name><value><int>46</int></value></member><member><name>prop_current_location</name><value><string>127.0.0.1</string></value></member><member><name>propr_current_mood</name><value><string>focused</string></value></member><member><name>prop_taglist</name><value><string>xmlrpc, xpostulate, wordpress, livejournal, dreamwidth, insanejournal</string></value></member><member><name>prop_currentmusic</name><value><string>none</string></value></member><member><name>userjournal</name><value><string>which journal?</string></value></member><member><name>event</name><value><string>Okay...I've started to hack up the xmlrpc functions.
First, I had to replace all "<" and ">" in html tags in a post with "<" and ">",
and then, I have basically just handwritten out a relevant xml file.
</string></value></member></struct></value></param></params></methodCall>
What I haven't done is tried to send such a file to a server, yet...
I'm not sure if the posting method has to be different from a flat post, in terms of simply sending this file as the post data...
More work...
But, hey, I'm working on it!
no subject
I read it.
I'm not sure how to use it, oddly.
I kind of see how it builds the "request", or, basically, the xml file, which I created (although differently), but I don't understand how it is sending the request.
I've tried several ways to send it with Tcl's http, which is how I sent flat posts, but it's not working for me.
I'm probably going to have to figure out this existing module.
I didn't want to use an external module, mostly to simplify installation and use for clueless users, really.
But, I suppose if I get it implemented and working, I can then make a starkit, which is basically a standalone binary, which will run on any platform, thus making installation and use as simple as possible.
I'm probably going to go that route.
Oh, but wait...the thing is, I am having difficulty running the existing xmlrpc module, because it requires stuff from ActiveTcl, which is not included in debian's repos.
I really don't want to remove the debian tcl and install ActiveState's distribution, which I'd have to do to get this module working.
Then, I think, if this is a headache for me to get running, how is it going to work for the average user?
no subject
Apparently, it's quite different than sending data à la flat posting method.
I might have better luck with cURL, than with Tcl's http, but I'm trying to use Tcl resources, again, to simplify installation and use for everybody (including windows users...yech).
no subject
Yeah, it doesn't make sense to require the user to install a crapload of stuff. (That's why btw I can't stand Python and Ruby applications - on my system, most of them require upgrades and addons which are incompatible with the current versions, and something inevitably breaks)
no subject
Should that be just the post text? (not including meta-data)?
I wonder if that's where I'm going wrong.
no subject
Btw I don't get comment notifications when you reply to your own comments.
no subject
The code is commented, but, still, can't figure out how it's sending the request.
Figured I should clarify that.
no subject