This blog has been powered by my own custom implementation of the Metaweblog
, because I wanted to test Windows Live Writer. As I posted before the current implementation of the Metaweblog API by WLW is not correct in the beta. According to the WLW newsgroup, on this issue, the team are taking a second look at the Metaweblog specifications. Funny thing is that WLW does not even follow the specifications found at MSDN.
The big problem is the metaWeblog.getCategories method which should return the categories of a specific blog. The response should, according to the Metaweblog specs, contain description, htmlUrl and rssUrl, but Windows Live Writer wants a response with categoryid and title. It seems like all of the different blog providers implemented by WLW has this issue; Movable Type (mt.getCategoryList expects categoryId and categoryName) and even Windows Live Spaces (which uses the metaWeblog.getCategories).
Today I got a comment on a previous post from Michael Ekegren who also stumbled upon the same problem as I did. So, if you would like to use WLW to your own homebrewed Metaweblog API, you have to return a response like this to the metaWeblog.getCategoris XML-RPC call.
Disclaimer: This is just how I got it to work on the current beta of Windows Live Writer and this will probably get fixed in the future and it is not the way it should be done according to the Metaweblog specifications.
1 2 <methodResponse> 3 <params> 4 <param> 5 <value> 6 <array> 7 <data> 8 <value> 9 <struct>10 <member>11 <name>categoryid</name>12 <value>1</value>13 </member>14 <member>15 <name>title</name>16 <value>Category 1</value>17 </member>18 </struct>19 <struct>20 <member>21 <name>categoryid</name>22 <value>2</value>23 </member>24 <member>25 <name>title</name>26 <value>Category 2</value>27 </member>28 </struct>29 </value>30 </data>31 </array>32 </value>33 </param>34 </params>35 </methodResponse>
Another problem with the categories in WLW is that the metaWeblog.getPost and metaWeblog.getRecentPosts shall return an XML-RPC struct for the categories for each post. Accordning to the specification the struct should contain an array of the titles of the catgeories as below:
1 <member> 2 <name>categories</name> 3 <value> 4 <array> 5 <data> 6 <value>Category 1</value> 7 <value>Category 2</value> 8 </data> 9 </array>10 </value>11 </member>
But Windows Live Writer expects it to be an array of the id’s of the categories instead, like this:
1 <member> 2 <name>categories</name> 3 <value> 4 <array> 5 <data> 6 <value>1</value> 7 <value>2</value> 8 </data> 9 </array>10 </value>11 </member>
Hope this helped someone out there :-). If not I have it all documented so I know why I did this when there is a new version of Windows Live Writer out…