Archive for the 'XmlRpc' Category
Please refer to this post for some background.
This series of posts has demonstrated how you can send XML-RPC requests to a WordPress server and get back responses. This allows you to do things like automatically post blog entries, modify them, delete them, etc. This is the type of thing that blogging editors do so you [...] Read more »
November 20th, 2008 | Posted in C#, XmlRpc | 2 Comments
Please refer to this post for some background.
Now that all the pieces are in place, a class called WordPressClient brings it all together. It has methods that correspond with some of the tasks you might try to accomplish (such as creating a new post, deleting a post, adding a category, etc.).
using System;
using System.Collections.Generic;
using System.Text;
namespace Piccolo.Common
{
public [...] Read more »
November 19th, 2008 | Posted in C#, XmlRpc | 1 Comment
Please refer to this post for some background.
The next class is used for actually sending and receiving XML-RPC messages over HTTP. I’ve also added some statements that write the requests and responses to Console.Out so you can see what they look like as they are going across the wire.
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using System.Xml;
namespace [...] Read more »
November 19th, 2008 | Posted in C#, XmlRpc | No Comments
Please refer to this post for some background.
This section builds on the previous post about regular expressions. When the XML-RPC server sends a response, you need to be able to parse through the XML. The following class can be used for that purpose.
using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
namespace Piccolo.Common
{
public class WordPressXmlParser
{
public static string[] ParseArray(string result)
{
result = [...] Read more »
November 18th, 2008 | Posted in C#, XmlRpc | No Comments
Please refer to this post for some background.
After you send a request to the XML-RPC server, it sends a response back to you in an XML structure. You have to parse out the values that are important (for example, whether the request was successful, a new post ID that was generated, etc.)
Again, the .NET Framework [...] Read more »
November 17th, 2008 | Posted in C#, XmlRpc | No Comments
Please refer to this post for some background.
When you’re sending requests to the server, you have to build text in XML. There are a few ways to do this in C#. One way is to use classes that were designed for this in the .NET Framework. However, I decided not to use these because they [...] Read more »
November 17th, 2008 | Posted in C#, XmlRpc | No Comments
Please refer to this post for some background.
OK, this post is going to talk about some of the plumbing. When you are sending requests to the server and when the server is replying with responses, you need to deal with key-value pairs. For example, userName = “steve” or password = “abc123″. C# has some classes [...] Read more »
November 15th, 2008 | Posted in C#, Collections, XmlRpc | No Comments
Please refer to this post for some background.
Using XML-RPC, you can create new blog posts, delete posts, edit posts, add categories, delete categories, etc.
XML-RPC operates over HTTP (the protocol we use to access a typical Web page). You send information in a request to the server, and the server replies with a response, telling you [...] Read more »
November 15th, 2008 | Posted in C#, XmlRpc | No Comments
Please refer to this post for some background on what I’m trying to do here.
Because it’s simple, I’m going to start with a class called WordPressBlogPost. This class holds information about a post–in this case, title, text, and categories. It’s not comprehensive but covers the core information you would need to know about a post.
namespace [...] Read more »
November 14th, 2008 | Posted in C#, XmlRpc | 1 Comment
This is the first in a series of posts about how to publish to a WordPress blog using an interface called XmlRpc that is supported by WordPress as well as other blogging platforms.
My motivation for writing these posts is that I have a hobby project that is written in the C# language, and I wanted [...] Read more »
November 14th, 2008 | Posted in C#, Java, Python, XmlRpc | 5 Comments