Will Schenk
2005-Mar-28 04:36 UTC
ActionWebService debugging: Works for in MarsEdit but Ecto explodes
I''ve got a MetaWeblogAPi -- pulled more or less form Scratch -- controller and i''m getting the error "Internal protocol error: Malformed SOAP or XML-RPC protocol message" Any ideas on how to track this down? This code works fine with MarsEdit, but ecto seems to kill it, and I have no idea how to figure out where the problem is. Ecto''s request is: <?xml version="1.0" encoding="UTF-8"?> <methodCall> <methodName>metaWeblog.newPost</methodName> <params> <param> <value><string>4</string></value> </param> <param> <value><string>wschenk</string></value> </param> <param> <value><string>******</string></value> </param> <param> <value><struct> <member> <name>dateCreated</name> <value><dateTime.iso8601>20050328T03:15:55Z</dateTime.iso8601></value> </member> <member> <name>title</name> <value><string>No Text</string></value> </member> <member> <name>description</name> <value><string>Simple</string></value> </member> </struct></value> </param> <param> <value><boolean>1</boolean></value> </param> </params> </methodCall> Thanks! -- Will Schenk http://www.sublimeguile.com http://www.myelinate.com
leon breedt
2005-Mar-28 06:57 UTC
Re: ActionWebService debugging: Works for in MarsEdit but Ecto explodes
On Sun, 27 Mar 2005 23:36:49 -0500, Will Schenk <wschenk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''ve got a MetaWeblogAPi -- pulled more or less form Scratch -- > controller and i''m getting the error > "Internal protocol error: Malformed SOAP or XML-RPC protocol message"This error occurs when neither SOAP or XML-RPC bindings can parse the message. Perhaps it would pay to do a diff between the two XML messages? Alternatively, if you are able, could you apply the changes at: http://dev.rubyonrails.com/changeset/1031 To your local installation? There was still an exception shallowing tucked away in XML-RPC, which has now been corrected (at least, the error message should be a little bit more revealing). Leon
Will Schenk
2005-Mar-28 13:56 UTC
Re: ActionWebService debugging: Works for in MarsEdit but Ecto explodes
Looks like I picked a good time to ask that question -- that patch just went in! Now it tells me: Internal protocol error: Malformed XML-RPC request On futher inspection, line 14 (and 36) swallow XMLRPC parsing exceptions in xmlrpc_encoding.rb . Does ruby have a nested exception facility? Pulling it apart, I get the real exception is: RuntimeError: wrong dateTime.iso8601 format So there''s a bug in the ruby XMLRPC code. It''s expecting "20050328T13:06:58" but ecto is sending "20050328T13:06:58Z" as a date -- the trailing Z is messing it up. I changed line 87 of xmlrpc/parser.rb to if str =~ /^(-?\d\d\d\d)(\d\d)(\d\d)T(\d\d):(\d\d):(\d\d).*$/ then and now both clients work. This is ruby 1.8.2 bug -- there''s a TODO there any everything. The saga continues... On Mon, 28 Mar 2005 18:57:29 +1200, leon breedt <bitserf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sun, 27 Mar 2005 23:36:49 -0500, Will Schenk <wschenk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > I''ve got a MetaWeblogAPi -- pulled more or less form Scratch -- > > controller and i''m getting the error > > "Internal protocol error: Malformed SOAP or XML-RPC protocol message" > This error occurs when neither SOAP or XML-RPC bindings can parse the > message. Perhaps it would pay to do a diff between the two XML > messages? > > Alternatively, if you are able, could you apply the changes at: > > http://dev.rubyonrails.com/changeset/1031 > > To your local installation? > > There was still an exception shallowing tucked away in XML-RPC, which > has now been corrected (at least, the error message should be a little > bit more revealing). > > Leon >-- Will Schenk http://www.sublimeguile.com http://www.myelinate.com
leon breedt
2005-Mar-29 09:17 UTC
ActionWebService debugging: Works for in MarsEdit but Ecto explodes
On Mon, 28 Mar 2005 08:56:47 -0500, Will Schenk <wschenk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On futher inspection, line 14 (and 36) swallow XMLRPC parsing > exceptions in xmlrpc_encoding.rb . Does ruby have a nested exception > facility?I don''t think its there by default, but sounds like the kind of thing someone must have already implemented..> Pulling it apart, I get the real exception is: > RuntimeError: wrong dateTime.iso8601 formatI should have squashed the last invalid exception narrowings now in trunk, so you should get that message and the full backtrace in the 500 response body from now on for unparseable requests. I really appreciate the time you''ve taken in tracking this down. Thanks! Leon