Page 1 of 1

XMLRPC and LiveWriter

Posted: Tue Jul 22, 2008 2:54 pm
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!

Re: XMLRPC and LiveWriter

Posted: Tue Jul 22, 2008 3:00 pm
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

Re: XMLRPC and LiveWriter

Posted: Tue Jul 22, 2008 4:02 pm
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

Re: XMLRPC and LiveWriter

Posted: Tue Jul 22, 2008 4:15 pm
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.

Re: XMLRPC and LiveWriter

Posted: Tue Jul 22, 2008 4:35 pm
by garvinhicking
Hi!

Fair enough, just committed to the official plugin :)

Regards,
Garvin

Posted: Mon Aug 11, 2008 9:13 pm
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?

Posted: Tue Aug 12, 2008 3:28 pm
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.

Posted: Tue Aug 12, 2008 6:20 pm
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?

Posted: Wed Aug 13, 2008 10:22 am
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