xmlrpc

B

Bryan Lim

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top