[typo] Problems with API?

Chris Saylor cwsaylor at gmail.com
Fri Dec 23 12:32:10 EST 2005


This one got me too. I figured it out though and posted about it on my
blog here:

http://www.justhack.com/articles/2005/12/21/performancing-for-firefox-blogging-tool

Basically, Performancing is passing over a value of "true" in the
xmlrpc call, but xmlrpc/parser.rb is expecting a number value. Not
sure if this is a problem in parser.rb or Performancing, but we have
access to the parser.rb so I hacked it, see above blog post.

-Chris

On 12/23/05, jennyw <jennyw at dangerousideas.com> wrote:
> I've been trying to use the Performancing Firefox extension to post blog
> entries. It can read the blog entires okay, but it won't post. Turns out
> there's an error (I don't think it's Performancing, but I'm not sure).
> Before I delve into this further, I thought I'd ask to see if anyone
> else has encountered this. The funny thing is that when I look at the
> backtrace, it looks like the error occurs before it even hits Typo code.
>
> Here are the headers (captured by LiveHTTPHeaders). Following, I have
> the results of replaying the headers.
>
> http://jennyw.dangerousideas.com/backend/xmlrpc
>
> POST /backend/xmlrpc HTTP/1.1
> Host: jennyw.dangerousideas.com
> User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8)
> Gecko/20051111 Firefox/1.5
> Accept:
> text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
> Accept-Language: en-us,en;q=0.5
> Accept-Encoding: gzip,deflate
> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
> Keep-Alive: 300
> Connection: keep-alive
> Content-Type: text/xml
> Content-Length: 761
> Pragma: no-cache
> Cache-Control: no-cache
> <?xml version="1.0"?><methodCall>
>   <methodName>metaWeblog.newPost</methodName>
>   <params>
>     <param>
>       <value>
>         <string>1</string>
>       </value>
>     </param>
>     <param>
>       <value>
>         <string>user</string>
>       </value>
>     </param>
>     <param>
>       <value>
>         <string>password</string>
>       </value>
>     </param>
>     <param>
>       <value>
>         <struct>
>           <member>
>             <name>title</name>
>             <value>test</value>
>           </member>
>           <member>
>             <name>description</name>
>             <value>test</value>
>           </member>
>         </struct>
>       </value>
>     </param>
>     <param>
>       <value>
>         <boolean>true</boolean>
>       </value>
>     </param>
>   </params>
> </methodCall>
>
> HTTP/1.x 500 Internal Server Error
> Date: Fri, 23 Dec 2005 16:28:35 GMT
> Server: lighttpd/1.4.8
> Content-Type: text/html; charset=UTF-8
> Cache-Control: no-cache
> X-Powered-By: The blood, sweat and tears of the fine, fine TextDrive staff
> Served-By: TextDrive
> Connection: close
> Transfer-Encoding: chunked
>
> Internal protocol error: RPC-value of type boolean is wrong
> Backtrace:
> /usr/local/lib/ruby/1.8/xmlrpc/parser.rb:78:in `boolean'
> /usr/local/lib/ruby/1.8/xmlrpc/parser.rb:534:in `tag_end'
> /usr/local/lib/ruby/1.8/rexml/parsers/streamparser.rb:26:in `parse'
> /usr/local/lib/ruby/1.8/rexml/document.rb:171:in `parse_stream'
> /usr/local/lib/ruby/1.8/xmlrpc/parser.rb:722:in `parse'
> /usr/local/lib/ruby/1.8/xmlrpc/parser.rb:477:in `parseMethodCall'
> /usr/local/lib/ruby/1.8/xmlrpc/marshal.rb:63:in `load_call'
> /usr/local/lib/ruby/1.8/xmlrpc/marshal.rb:32:in `load_call'
> /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.0.0/lib/action_web_service/protocol/xmlrpc_protocol.rb:36:in
> `decode_request'
> /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.0.0/lib/action_web_service/protocol/xmlrpc_protocol.rb:32:in
> `decode_action_pack_request'
> /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.0.0/lib/action_web_service/protocol/discovery.rb:20:in
> `discover_web_service_request'
> /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.0.0/lib/action_web_service/protocol/discovery.rb:18:in
> `each'
> /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.0.0/lib/action_web_service/protocol/discovery.rb:18:in
> `discover_web_service_request'
> /usr/local/lib/ruby/gems/1.8/gems/actionwebservice-1.0.0/lib/action_web_service/dispatcher/action_controller_dispatcher.rb:44:in
> `dispatch_web_service_request'
> (eval):1:in `xmlrpc'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:853:in
> `send'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:853:in
> `perform_action_without_filters'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/filters.rb:332:in
> `perform_action_without_benchmark'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in
> `perform_action_without_rescue'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in
> `measure'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in
> `perform_action_without_rescue'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/rescue.rb:82:in
> `perform_action'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:369:in
> `send'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:369:in
> `process_without_session_management_support'
> /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/session_management.rb:116:in
> `process'
> /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:38:in
> `dispatch'
> /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:141:in
> `process_request'
> /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:53:in
> `process!'
> /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in
> `each_cgi'
> /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/./fcgi.rb:597:in `each'
> /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/./fcgi.rb:597:in `each_cgi'
> /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in
> `process!'
> /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in
> `process!'
> /home/jennyw/sites/jennyw.dangerousideas.com/public/dispatch.fcgi:24
>
> Thanks for any help!
>
> Jen
>
> _______________________________________________
> Typo-list mailing list
> Typo-list at rubyforge.org
> http://rubyforge.org/mailman/listinfo/typo-list
>



More information about the Typo-list mailing list