Return-Path: Delivered-To: apmail-roller-commits-archive@www.apache.org Received: (qmail 82464 invoked from network); 24 May 2009 02:25:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 May 2009 02:25:06 -0000 Received: (qmail 29520 invoked by uid 500); 24 May 2009 02:25:19 -0000 Delivered-To: apmail-roller-commits-archive@roller.apache.org Received: (qmail 29493 invoked by uid 500); 24 May 2009 02:25:18 -0000 Mailing-List: contact commits-help@roller.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@roller.apache.org Delivered-To: mailing list commits@roller.apache.org Received: (qmail 29484 invoked by uid 99); 24 May 2009 02:25:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 May 2009 02:25:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 May 2009 02:25:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 1893029A0015 for ; Sat, 23 May 2009 19:24:46 -0700 (PDT) Message-ID: <1819942883.1243131886099.JavaMail.jira@brutus> Date: Sat, 23 May 2009 19:24:46 -0700 (PDT) From: "Dave Johnson (JIRA)" To: commits@roller.apache.org Subject: [jira] Issue Comment Edited: (ROL-1811) Windows Live Writer fail to do updates - solved In-Reply-To: <1336875017.1241380110307.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/ROL-1811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12712483#action_12712483 ] Dave Johnson edited comment on ROL-1811 at 5/23/09 7:24 PM: ------------------------------------------------------------ Apparently, Wordpress gets it wrong too. Check the discussion here: http://comox.textdrive.com/pipermail/wp-xmlrpc/2007-November/000096.html If you believe that, most blog servers get it wrong and return an array of structs. That's probably why Windows Live Writer does it that way. Oh and check this, Microsoft docs get it wrong as well: http://msdn.microsoft.com/en-us/library/aa905667.aspx I'm inclined to make this configurable and default to array of structs as you suggest, Steven. was (Author: snoopdave): Apparently, Wordpress gets it wrong too. Check the discussion here: http://comox.textdrive.com/pipermail/wp-xmlrpc/2007-November/000096.html If you believe that, most blog servers get it wrong and return an array of structs. That's probably why Windows Live Writer does it that way. I'm inclined to make this configurable and default to array of structs as you suggest, Steven. > Windows Live Writer fail to do updates - solved > ------------------------------------------------ > > Key: ROL-1811 > URL: https://issues.apache.org/jira/browse/ROL-1811 > Project: Roller > Issue Type: Bug > Components: Web Services > Affects Versions: 4.0.1 > Reporter: Steven Board > Assignee: Roller Unassigned > Priority: Minor > Original Estimate: 0.5h > Remaining Estimate: 0.5h > > Hi Guys, > I know you're aware that Windows Live Writer is unable to perform updates to roller blogs using the xml rpc, however I thought I would let you know why and how I fixed it locally incase you wanted to apply this fix to the next release of roller. > The reason the update to blogs fails is actually due to the org.apache.roller.weblogger.webservices.xmlrpc.MetaWeblogAPIHandler.getCategories method actually having two bugs. > The first is trivial and is the fact that you pass the userId to the MetaWeblogAPIHandler.createCategoryStruct(WeblogCategory category, String userid) method, rather than the blogId. The createCategoryStruct method then incorrectly creates the rssUrl and htmlUrls. > The second is the fact that the getCategories method does not comply with the MetaWeblog API. The method you have created returns a Hashtable with the categories as keys with the values being another Hashtable as defined by the MetaWeblog API for the getCategories method. The getCategories should just return the values from the currently returned Hashtable as a List. > e.g. The getCategories method should be something like the below. > public Object getCategories(String blogid, String userid, String password) > throws Exception { > mLogger > .debug("STEVEN BAORD custom getCategories() Called =====[ SUPPORTED ]====="); > mLogger.debug((new StringBuilder()).append(" BlogId: ").append( > blogid).toString()); > mLogger.debug((new StringBuilder()).append(" UserId: ").append( > userid).toString()); > Weblog website = validate(blogid, userid, password); > Weblogger roller = WebloggerFactory.getWeblogger(); > try { > WeblogManager weblogMgr = roller.getWeblogManager(); > List cats = weblogMgr.getWeblogCategories(website, false); > ArrayList result = new ArrayList(); > WeblogCategory category; > Iterator wbcItr = cats.iterator(); > while (wbcItr.hasNext()) { > category = (WeblogCategory) wbcItr.next(); > result.add(createCategoryStruct(category, blogid)); > } > return result; > } catch (Exception e) { > String msg = "ERROR in MetaWeblogAPIHandler.getCategories"; > mLogger.error(msg, e); > throw new XmlRpcException(1000, msg); > } > } > For anyone else wanting to fix this locally you also need to set the site.absoluteurl property in the roller_properties tables within the database to the url for your roller instance. e.g. http:///roller. This is to make sure that the rssUrl and httpUrl for the categories are correctly created with their full paths. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.