From: Bryan Lim on
hi all,


i need some help with the following error from wordpress xmlrpc.


error:

/usr/local/lib/ruby/site_ruby/1.8/xmlrpc/create.rb:267:in `conv2value':
#<Class:0x33426c> (RuntimeError)
from /usr/local/lib/ruby/site_ruby/1.8/xmlrpc/create.rb:106:in
`methodCall'
from /usr/local/lib/ruby/site_ruby/1.8/xmlrpc/create.rb:105:in
`collect'
from /usr/local/lib/ruby/site_ruby/1.8/xmlrpc/create.rb:105:in
`methodCall'
from /usr/local/lib/ruby/site_ruby/1.8/xmlrpc/client.rb:381:in `call2'
from xmlrpc.rb:40




xmlrpc.rb

require "xmlrpc/client"


blog = XMLRPC::Client.new("127.0.0.1", "/wordpress/xmlrpc.php",8888)


d2 = DateTime.now
Custom_field = Struct.new(:blog_id,:page_id ,:username ,:password)
Custom_field.new(1,1,"admin","root")

cf = [Custom_field]

content = Struct.new(:wp_slug,
:wp_password,:wp_page_parent_id,:wp_page_order,:wp_author_id,:title,:description,
:mt_excerpt, :mt_text_more, :mt_allow_comments, :mt_allow_pings,
:dateCreated ,:custom_fields)

content.new("Dave","guhhkj",1,2,3,"This is my first xmlrpc post","This
is the content of my first xmlrpc
post","hellooooo","Helllllooooooo",1,1,d2,cf)

result = blog.call2("wp.newPage",1,"admin","root",content,true)
--
Posted via http://www.ruby-forum.com/.