从ruby运行jiraSOAP的问题

时间:2011-10-26 18:12:28

标签: soap jira ruby-1.9.2

我正在尝试使用jiraSOAP gem从ruby访问jira。 我正在运行ruby 1.9.2

但是当我传递登录凭据时,我收到以下错误:

RuntimeError: The response is not a valid SOAP envelope
from /Users/rahulbaxi/.rvm/gems/ruby1.9.2p180/gems/handsoap1.1.8/lib/handsoap-/service.rb:388:in on_missing_document'

from /Users/rahulbaxi/.rvm/gems/ruby-1.9.2-p180/gems/handsoap-1.1.8/lib/handsoap/service.rb:442:in `parse_http_response'`
from /Users/rahulbaxi/.rvm/gems/ruby-1.9.2-p180/gems/handsoap-1.1.8/lib/handsoap/service.rb:250:in `invoke'
from /Users/rahulbaxi/.rvm/gems/ruby-1.9.2-p180/gems/jiraSOAP-0.10.3/lib/jiraSOAP/api.rb:55:in `build'
from /Users/rahulbaxi/.rvm/gems/ruby-1.9.2-p180/gems/jiraSOAP-0.10.3/lib/jiraSOAP/api.rb:69:in `soap_call'
from /Users/rahulbaxi/.rvm/gems/ruby-1.9.2-p180/gems/jiraSOAP-0.10.3/lib/jiraSOAP/api.rb:18:in `login'
from (irb):3
from /Users/rahulbaxi/.rvm/rubies/ruby-1.9.2-p180/bin/irb:16:in `<main>'`

请帮我解决这个问题!

3 个答案:

答案 0 :(得分:1)

也许其中一个样本会有所帮助。

http://jira4r.rubyhaus.org/2+minute+walkthrough http://blogs.reucon.com/srt/2007/11/05/accessing_jira_from_ruby.html

#!/usr/bin/env ruby
require 'jira4r/jira4r'

jira = Jira::JiraTool.new(2, "http://jira.atlassian.com")
jira.login("soaptester", "soaptester")

puts jira.getProject("DEMO").inspect

答案 1 :(得分:1)

您确定JIRA实例已启用RPC功能吗?

看到来自JIRA服务器的HTTP响应并知道它是什么版本的JIRA 真的

答案 2 :(得分:0)

最终使用了jira4r-jh,这对Rubyy 1.9来说效果很好。