XMLRPC and LiveWriter

Creating and modifying plugins.
Post Reply
XenoPhage
Regular
Posts: 20
Joined: Mon Nov 20, 2006 10:52 pm

XMLRPC and LiveWriter

Post by XenoPhage »

Hi all,

I had a chance to speak with Joe Chang from Microsoft about Live Writer and auto-detection of the blog settings. He informed me that Serendipity is currently advertising itself as a Metaweblog API blog. The result is that certain features are disabled, such as keywords and comments. However, if I manually switch LiveWriter to use the Moveable Type API, all of the features are available.

Is there any particular reason that the XMLRPC plugin chooses to advertise Metaweblog and not Moveable type?

Also, Joe mentioned that LiveWriter will look for a capabilities document called wlwmanifest.xml. He pointed me to documentation about this file. I wonder, is it possible to create a plugin that will automatically create this file? Or, perhaps, create a sample manifest file and include it with the distro?

Thanks!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: XMLRPC and LiveWriter

Post by garvinhicking »

Hi!
Is there any particular reason that the XMLRPC plugin chooses to advertise Metaweblog and not Moveable type?
No, I guess this is only because the advertisement XML information was taken from a code documentation that had Metaweblog listed as preferrable format and we did not see the XSD information for the MT API.

Do you know what the API string needs to be? I guess

Code: Select all

<api name="MovableType"... />
but I could not find any final technical documentation on this?

As for creation of a wlwmanifest.xml file, I believe there are external tools that deal with this pretty well, and re-creating such tools inside PHP application scope is a bit waste of time when you can do it quite easy with a desktop application already. I wouldn't mind anyone developing it and adding to the code, but I myself do not have that time...

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Freudi
Regular
Posts: 97
Joined: Thu Nov 23, 2006 6:29 am
Contact:

Re: XMLRPC and LiveWriter

Post by Freudi »

garvinhicking wrote: Do you know what the API string needs to be? I guess

Code: Select all

<api name="MovableType"... />
but I could not find any final technical documentation on this?
According to http://www.movabletype.org/documentatio ... overy.html you're correct anyway.

Bye,
Freudi
XenoPhage
Regular
Posts: 20
Joined: Mon Nov 20, 2006 10:52 pm

Re: XMLRPC and LiveWriter

Post by XenoPhage »

Freudi wrote:According to http://www.movabletype.org/documentatio ... overy.html you're correct anyway.

Bye,
Freudi
Aww.. beat me to the punch.. I just verified that this works... I added the following line to serendipity_event_xmlrpc.php :

Code: Select all

<api name="MovableType" preferred="true"  apiLink="' . $serendipity['baseURL'] . 'serendipity_xmlrpc.php" blogID="1" />
LiveWriter picked it up as a MovableType API blog from there.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: XMLRPC and LiveWriter

Post by garvinhicking »

Hi!

Fair enough, just committed to the official plugin :)

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
tpost
Regular
Posts: 77
Joined: Fri Sep 21, 2007 1:45 am

Post by tpost »

Hi Garvin,

When I use Live Writer to post I get the following error:

Code: Select all

 Invalid Server Response. The response to the metaWeblog.editPost method received from the weblog server was invalid:

Invalid response document returned from XmlRpc server
The entry gets posted in S9Y, but i'm guessing the newest changes to the XML-RPC plugin is throwing this error.

I could be wrong though.

Is anyone else experiencing this error?
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Actually, that's saying that the server didn't respond at all. Do you have the XML-RPC plugin installed, and are you pointing LiveWriter to its URL? Pointing to the front page won't work properly.
Judebert
---
Website | Wishlist | PayPal
tpost
Regular
Posts: 77
Joined: Fri Sep 21, 2007 1:45 am

Post by tpost »

Hi judebert,

WLW seems to auto-detect S9Y as a provider now, so I can't manually change that to "Custom (Moveable Type API)" and inserting the link to /serendipity_xmlrpc.php.

I do have the XMLRPC plugin installed, as our posts from WLW do get posted, but it does throw the "Invalid Server Response" error every time we post though.

Any idea how to manually configure WLW's settings to stop it from auto-detecting?

---

Here's the complete log from WLW for reference:

Code: Select all

WindowsLiveWriter,868,Fail,00009,11-Aug-2008 12:36:15.109,"WindowsLive.Writer.Extensibility.BlogClient.BlogClientInvalidServerResponseException: Invalid Server Response - The response to the metaWeblog.editPost method received from the weblog server was invalid:

Invalid response document returned from XmlRpc server
   at WindowsLive.Writer.BlogClient.Clients.XmlRpcBlogClient.CallMethod(String methodName, XmlRpcValue[] parameters)
   at WindowsLive.Writer.BlogClient.Clients.MetaweblogClient.MetaweblogEditPost(String blogId, BlogPost post, Boolean publish)
   at WindowsLive.Writer.BlogClient.Clients.MetaweblogClient.MovableTypeNewPost(String blogId, BlogPost post, Boolean publish)
   at WindowsLive.Writer.BlogClient.Clients.MetaweblogClient.NewPost(String blogId, BlogPost post, INewCategoryContext newCategoryContext, Boolean publish)
   at WindowsLive.Writer.BlogClient.Clients.XmlRpcBlogClient.NewPost(String blogId, BlogPost post, INewCategoryContext newCategoryContext, Boolean publish, String& etag, XmlDocument& remotePost)
   at WindowsLive.Writer.BlogClient.Blog.NewPost(BlogPost post, INewCategoryContext newCategoryContext, Boolean publish)
   at WindowsLive.Writer.PostEditor.UpdateWeblogAsyncOperation.DoWork()
   at WindowsLive.Writer.CoreServices.AsyncOperation.InternalStart()","   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at WindowsLive.Writer.CoreServices.Diagnostics.LogFileTraceListener.Fail(String message)
   at System.Diagnostics.TraceInternal.Fail(String message)
   at System.Diagnostics.Trace.Fail(String message)
   at WindowsLive.Writer.PostEditor.BlogPostEditingManager.UpdateWeblog(Boolean publish)
   at WindowsLive.Writer.PostEditor.BlogPostEditingManager.PostToWeblog(Boolean publish)
   at WindowsLive.Writer.PostEditor.PostEditorMainControl.commandPostAndPublish_Execute(Object sender, EventArgs e)
   at WindowsLive.Writer.ApplicationFramework.Command.RaiseEvent(Object eventKey, EventArgs e)
   at WindowsLive.Writer.ApplicationFramework.Command.OnExecute(EventArgs e)
   at WindowsLive.Writer.ApplicationFramework.CommandBarButtonLightweightControl.OnMouseUp(MouseEventArgs e)
   at WindowsLive.Writer.Controls.LightweightControl.RaiseMouseUp(MouseEventArgs e)
   at WindowsLive.Writer.Controls.LightweightControlContainerControl.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.UserControl.WndProc(Message& m)
   at WindowsLive.Writer.Controls.LightweightControlContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.Run(Form mainForm)
   at WindowsLive.Writer.ApplicationFramework.SatelliteApplicationForm.Launcher.ThreadMain(Object[] parameters)
   at WindowsLive.Writer.CoreServices.Threading.ThreadStartWithParams.Run()
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()"
WindowsLiveWriter,868,None,00010,11-Aug-2008 12:36:15.109,"DisplayableException occurred: WindowsLive.Writer.Extensibility.BlogClient.BlogClientInvalidServerResponseException: Invalid Server Response - The response to the metaWeblog.editPost method received from the weblog server was invalid:

Invalid response document returned from XmlRpc server
   at WindowsLive.Writer.BlogClient.Clients.XmlRpcBlogClient.CallMethod(String methodName, XmlRpcValue[] parameters)
   at WindowsLive.Writer.BlogClient.Clients.MetaweblogClient.MetaweblogEditPost(String blogId, BlogPost post, Boolean publish)
   at WindowsLive.Writer.BlogClient.Clients.MetaweblogClient.MovableTypeNewPost(String blogId, BlogPost post, Boolean publish)
   at WindowsLive.Writer.BlogClient.Clients.MetaweblogClient.NewPost(String blogId, BlogPost post, INewCategoryContext newCategoryContext, Boolean publish)
   at WindowsLive.Writer.BlogClient.Clients.XmlRpcBlogClient.NewPost(String blogId, BlogPost post, INewCategoryContext newCategoryContext, Boolean publish, String& etag, XmlDocument& remotePost)
   at WindowsLive.Writer.BlogClient.Blog.NewPost(BlogPost post, INewCategoryContext newCategoryContext, Boolean publish)
   at WindowsLive.Writer.PostEditor.UpdateWeblogAsyncOperation.DoWork()
   at WindowsLive.Writer.CoreServices.AsyncOperation.InternalStart()",""
Hope that helps in some form!

[EDIT] After researching this issue on Google, it seems that some Wordpress users are experiencing the same problem due to some plugins:
http://e-volutiononline.com/blog/wordpr ... riter.html

Do you think that a S9Y plugin could conflict with WLW?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

It could be that some plugin executes which delivers output that WLW does not like, like the sitemap plugins or others. Could you temporarily set your event plugins to "hidden" so that they are not executed? Then you could see if that makes a difference.

Another way would be to enable the debugging of the XMLRPC plugin. You can set teh $debug variable to "true" in the serendipity_xmlrpc.inc.php file and change the constant DEBUG_LOG_XMLRPC (defaults to '/temp/rpc.log') to a filename where s9y will log the input/output it creates...

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply