[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Can I use xmlrpc to manage my msn spaces

huang zhimin

4/19/2008 6:58:00 AM

[Note: parts of this message were removed to make it a legal post.]

I have encountered a problem to use xmlrpc to connect to my msn spaces. I
use rmetaweblog which is inherit from xmlrpc/client, the error is shown
below:

irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'rmetaweblog'
=> true
irb(main):005:0> blog = RMetaWebLog.new('storage.msn.com',
'/storageservice/MetaWeblog.rpc', 443, {:use_ssl=>'true', :blog_url=>'
http://xxx.spaces.liv..., :blog_id=>'xxx', :api_user=>'xxx',
:api_pass=>'yyy'})
=> #<RMetaWebLog:0xb7922284 @use_ssl="true", @cookie=nil, @auth=nil,
@user=nil, @proxy_port=nil, @api_user="xxx", @http_last_response=nil,
@blog_url="http://xxx.spaces.live..., @create=nil, @port=443,
@path="/storageservice/MetaWeblog.rpc", @http=#<Net::HTTP
storage.msn.com:443 open=false>, @proxy_host=nil, @http_header_extra=nil,
@parser=nil, @timeout=30, @api_pass="yyy", @host="storage.msn.com",
@blog_id="xxx", @password=nil>
irb(main):006:0> blog.categories
warning: peer certificate won't be verified in this SSL session
XMLRPC::FaultException: XMLRPC::FaultException
from /usr/lib/ruby/1.8/xmlrpc/client.rb:414:in `call'
from
/usr/lib/ruby/gems/1.8/gems/rmetaweblog-1.0/lib/rmetaweblog.rb:75:in
`categories'
from (irb):6
from /usr/local/lib/site_ruby/1.8/rubygems/requirement.rb:140

xxx is the username of my spaces, and yyy is the secret word of email
publish. Can anybody give me some suggestion?



--
My msn spaces: http://flyerhzm.space...

1 Answer

pieterste

4/21/2008 5:54:00 PM

0

Hi Huang,

Sorry for a late reply, had quite a busy weekend. You can use
RMetaWebLog for MSN spaces, here is the format I use to get connected:

So my code same for Spaces is:

blog = RMetaWebLog.new("storage.msn.com", "/storageservice/
MetaWeblog.rpc", 443,
{:blog_url => "blogname.spaces.live.com",
:blog_id => "MyBlog",
:api_user => "myuser",
:api_pass => "mypass",
:use_ssl => true
} )

Try like that and let me know, I've quickly checked and it looks like
you used an http:// in blog_url which is not needed.

Regards,
Pieter Steyn

>On Apr 19, 8:57 am, huang zhimin <flyer...@gmail.com> wrote:
> [Note:  parts of this message were removed to make it a legal post.]
>
> I have encountered a problem to use xmlrpc to connect to my msn spaces. I
> use rmetaweblog which is inherit from xmlrpc/client, the error is shown
> below:
>
> irb(main):001:0> require 'rubygems'
> => true
> irb(main):002:0> require 'rmetaweblog'
> => true
> irb(main):005:0> blog = RMetaWebLog.new('storage.msn.com',
> '/storageservice/MetaWeblog.rpc', 443, {:use_ssl=>'true', :blog_url=>'http://xxx.spaces.liv..., :blog_id=>'xxx', :api_user=>'xxx',
> :api_pass=>'yyy'})
> => #<RMetaWebLog:0xb7922284 @use_ssl="true", @cookie=nil, @auth=nil,
> @user=nil, @proxy_port=nil, @api_user="xxx", @http_last_response=nil,
> @blog_url="http://xxx.spaces.live..., @create=nil, @port=443,
> @path="/storageservice/MetaWeblog.rpc", @http=#<Net::HTTP
> storage.msn.com:443 open=false>, @proxy_host=nil, @http_header_extra=nil,
> @parser=nil, @timeout=30, @api_pass="yyy", @host="storage.msn.com",
> @blog_id="xxx", @password=nil>
> irb(main):006:0> blog.categories
> warning: peer certificate won't be verified in this SSL session
> XMLRPC::FaultException: XMLRPC::FaultException
>         from /usr/lib/ruby/1.8/xmlrpc/client.rb:414:in `call'
>         from
> /usr/lib/ruby/gems/1.8/gems/rmetaweblog-1.0/lib/rmetaweblog.rb:75:in
> `categories'
>         from (irb):6
>         from /usr/local/lib/site_ruby/1.8/rubygems/requirement.rb:140
>
> xxx is the username of my spaces, and yyy is the secret word of email
> publish. Can anybody give me some suggestion?
>
> --
> My msn spaces:http://flyerhzm.space...