这适用于我使用soapUI,但不适用于 jira4r,运行 4.01。问题在于jira4r(我正在运行 v0.3.0)。似乎 wsdl 和相关的驱动程序代码是硬连线的,这不包括“getIssuesFromJqlSearch”调用。搜索ruby/gems/1.8/gems/jira4r-0.3.0
一下,看看我的意思。搜索“getVersions”揭示了这一点:
./lib/jira4r/v2/jira_soap_service_driver.rb
./wsdl/jirasoapservice-v2.wsdl
搜索“getIssuesFromJqlSearch”时什么也没有显示。
我通过替换./wsdl/jirasoapservice-v2.wsdl
我的Jira实例中的版本(它位于http://your-jira-instance/rpc/soap/jirasoapservice-v2?wsdl
)解决了这个问题,然后./lib/jira4r/v2/jira_soap_service_driver.rb
通过添加以下内容来适当地修补(看起来它是从 WSDL 自动生成的):
[ XSD::QName.new(NsSoapRpcJiraAtlassianCom, "getIssuesFromJqlSearch"),
"",
"getIssuesFromJqlSearch",
[ ["in", "in0", ["::SOAP::SOAPString"]],
["in", "in1", ["::SOAP::SOAPString"]],
["in", "in2", ["::SOAP::SOAPInt"]],
["retval", "getIssuesFromJqlSearchReturn", ["Jira4R::V2::ArrayOf_tns1_RemoteIssue", "http://jira.atlassian.com/rpc/soap/jirasoapservice-v2", "ArrayOf_tns1_RemoteIssue"]] ],
{ :request_style => :rpc, :request_use => :encoded,
:response_style => :rpc, :response_use => :encoded,
:faults => {"Jira4R::V2::RemoteException_"=>{:use=>"encoded", :name=>"RemoteException", :ns=>"http://jira.atlassian.com/rpc/soap/jirasoapservice-v2", :namespace=>"http://jira.atlassian.com/rpc/soap/jirasoapservice-v2", :encodingstyle=>"http://schemas.xmlsoap.org/soap/encoding/"}} }
],
显然,如果jira4r从您的实例下载正确的 WSDL 会很好,以避免这些类型的版本不兼容 :)