# Xmlrpc

**URL:** <https://www.ruby-forum.com/t/xmlrpc/176319>\
**Category:** Ruby\
**Created:** [September 29, 2009, 2:08am UTC](https://www.ruby-forum.com/t/xmlrpc/176319 "2009-09-29T02:08:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/db5fbb/32.png) [@bryan](https://www.ruby-forum.com/u/bryan)\
**Post date:** [September 29, 2009, 2:08am UTC](https://www.ruby-forum.com/t/xmlrpc/176319/1 "2009-09-29T02:08:39Z")

</div>

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)
