System.out.println(" title=" + title);
System.out.println(" content=" + content);
System.out.println(" category=" + category);
System.out.println(" publish=true");
XmlRpcClient xmlrpc = new XmlRpcClient(url);
Vector params = new Vector();
params.add(blogid);
params.add(username);
params.add(password);
Hashtable struct = new Hashtable();
struct.put("title", title);
struct.put("description", content);
Vector categories = new Vector();
if (category != null) {
StringTokenizer tok = new StringTokenizer(category, ",");
while (tok.hasMoreTokens()) {
categories.add(tok.nextToken().trim());
}
}
struct.put("categories", categories);
params.add(struct);
params.add(Boolean.TRUE);
Object postId = xmlrpc.execute(handler + ".newPost", params);
System.out.println("New post id is " + postId);
} catch (Exception e) {
throw new BuildException(e);