WordPress.org

Ready to get started?Download WordPress

Forums

Seeking Sample XML or definitions for XML-RPC API (5 posts)

  1. kwdavids
    Member
    Posted 2 years ago #

    I am looking for a full set of sample XML messages or dtd/xsd/xdr XML definitions for use with WordPress XML-RPC. My diligent efforts returned only a few samples.

  2. hagendit
    Member
    Posted 1 year ago #

    As am I kwdavids, as am I.

    I'm building WP XML-RPC interfaces in a system that does not have native array and XML handling, nor are libraries available - i.e. from scratch - and all the wonderful PHP examples on the interwebs are of no help to me.

    Specifically, I need to know how to format the new-style taxonomy component of the wp.newPost RPC call: categories, and how to build the XML section that details them. Did you manage to find an example of this per chance?
    Happy to help out with any of your queries, if still unanswered.

    Regards

  3. Marko Heijnen
    Member
    Posted 1 year ago #

    Whats wrong with the codex? http://codex.wordpress.org/XML-RPC

  4. 00slim
    Member
    Posted 1 year ago #

    I have some issue with XML-RPC using Java, org.apache.xmlrpc.client.XmlRpcClient.
    I tried to upload an image to my blog using wp.uploadFile and suprisingly i didn't have any errors. But when i go to media section of my blog i can see my newly added file but without any content. It looks like blank empty image.

    Here are my data:
    HashMap struct = new HashMap();
    struct.put("name", filename);
    struct.put("type", "image/jpeg");
    String b64 = Base64.encodeBytes(readImageAsByteArray(filepath));
    struct3.put("bits", b64);

    b64 string is correct - web browser displays an image.
    Upload action also seems ok because i got response like this:
    {id=76, file=1.jpg, type=image/jpeg, url=http://[...]files.wordpress.com/2013/03/121.jpg}

    But photo is blank, empty. Anyone has any idea?

  5. Marko Heijnen
    Member
    Posted 1 year ago #

    This is by sure not a support forum for Java. I only can redirect you to the source code of the WordPress android app: https://android.trac.wordpress.org/browser/trunk/src/org/wordpress/android/util/PostUploadService.java#L471. I only can see they are using getFileStreamPath from the context but till now I never worked on an android app so no clue if this helps or not.

    You can try IRC chat and ask in the #wordpress-mobile channel. They are the developers and mostly work for Automattic/WordPress.com

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags