Tag Archives: code

WordPress XML-RPC Endpoint Validator

WordPress uses the XML-RPC remote publishing interface in order to provide a standardized way to transfer data between 3rd party clients, like mobile/desktop apps, and the core of the CMS. These 3rd party clients may ask for something like an XML-RPC (or API) endpoint, which will usually is your blog domain followed by “xmlrpc.php". So, for example, if your site was at daniloercoli.wordpress.com, your endpoint would be:

https://daniloercoli.wordpress.com/xmlrpc.php or https://daniloercoli.wordpress.com/xmlrpc.php

The Endpoint requires username/password, this is the same username and password that you use to login to WordPress, and it’s secure like the browser login.

Themes and Plugins can interact and change the behavior of the XML-RPC Endpoint, by adding new methods, or modifying the response document. There are actually a lot of plugins that interact with it in some way, but unfortunately, plugins and themes could break the XML-RPC endpoint,  or invalidate the XML response document. When I need to reply to a question about the EndPoint that’s not working on a self-hosted installation of WordPress I usually reply with the following words:

Did you try with the default theme and with no active plugins?

Trying it with the default theme and plugins disabled will help pin down where the problem is. If everything works then you go back and enable your theme and then try it again. If everything still works then you go back and activate each plugin one at a time until you find the one that is causing the breakage.

The Validator
Since my team and I usually spend a lot of time replying to questions on issues on the XML-RPC endpoint of WordPress sites, I’ve decided to write a web tool that can be used to easily test the Endpoint. This tool should speed up our work, and will give to users a simple way to test the endpoint of their sites. I wrote this tool in PHP (https://github.com/daniloercoli/WordPress-XML-RPC-Validator), by using WordPress as framework, and for simplicity in this first release it’s a plugin that adds a page to your site. That page embeds the XML-RPC validator. It does some XML-RPC calls to your blog, checks the response documents, and in case of errors gives back hints on how to fix the issue. At this moment it’s just an experiment, no fancy UI there, but I will probably improve it over the time. A live version of the validator is available here.  Please, contribute to the project 🙂

 

Resources

An introduction to BlackBerry Hybrid development

Application designer and developer are freely to choose which technologies to use when building blackberry solution: java or web.

Java applications are deployed directly in the device and provides very high level of interoperability with native systems and use a huge set of powerful java APIs. These type of application tends to be very powerful and functionality however the developers and designer should spent some times to design an attractive user interface, on the other side, the web application (widget) can be used to describe any content that can be access by a web browser. These type of application is easy to design and develop because is based on standard web technologies, that are well common by developer, but provides a less integration with the device. They cannot access the most of the blackberry java APIs.

Feature Java Web
Easy to design user interface no yes
Ability to integrate with native system yes low
Dependency on network coverage no yes

The concept of hybrid blackberry applications, that is the merging of java development and web development technologies, to get the best from both world, is an emerging reality nowadays. Developer can build powerfully java application that combines the use of embedded browser object with the functionalities provided by the native blackberry device software.
By using an embedding browser object as a presentation layer for your application you can read web content from local or from the net and uses to display attractive UI. You can reuse your knowledge and your code based on HTML, JavaScript, Ajax, SVG, and CSS technologies to build your application interface, while you “backend” is in java. Your application still remain a java application, so you can access the file system, messaging, and push. The recent improvements to the platform through the BrowserField2 API and BlackBerry Widget SDK represent the next evolution of hybrid BlackBerry application development, as well as providing developers with a way of easily creating their own Super Apps.

Continue reading