i am getting error “no schemaLocation attribute in import” when using Python client accessing JIRA via SOAP

这里是示例代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python

# Sample Python client accessing JIRA via SOAP. By default, accesses
# http://jira.atlassian.com with a public account. Methods requiring
# more than basic user-level access are commented out. Change the URL
# and project/issue details for local testing.
#
# Note: This Python client only works with JIRA 3.3.1 and above (see
# http://jira.atlassian.com/browse/JRA-7321)
#
# Refer to the SOAP Javadoc to see what calls are available:

import SOAPpy , getpass , datetime

soap = SOAPpy. WSDL. Proxy ( ‘http://jira.company.com:8080/rpc/soap/jirasoapservice-v2?wsdl’ )

jirauser = ‘username’
passwd = ‘password’

# This prints available methods, but the WSDL doesn’t include argument
# names so its fairly useless. Refer to the Javadoc URL above instead
#print ‘Available methods: ‘, soap.methods.keys()

def listSOAPmethods ( ):
    for key in soap. methods. keys ( ):
        print key , ‘: ‘
        for param in soap. methods [key ]. inparams:
            print \\t’ , param. name. ljust ( 10 ) , param. type
        for param in soap. methods [key ]. outparams:
            print \\tOut: ‘ , param. name. ljust ( 10 ) , param. type

auth = soap. login (jirauser , passwd )

issue = soap. getIssue (auth , ‘QA-79’ )
print “Retrieved issue:” , issue

print “Done!”

完整的错误如下,为了提供完整的上下文:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
IMPORT:  http://service. soap. rpc. jira. atlassian. com
no schemaLocation attribute in import
IMPORT:  http://jira. mycompany. com: 8080/rpc/soap/jirasoapservice-v2
no schemaLocation attribute in import
IMPORT:  http://exception. rpc. jira. atlassian. com
no schemaLocation attribute in import
IMPORT:  http://schemas. xmlsoap. org/soap/encoding/
no schemaLocation attribute in import
/usr/local/lib/python2.6/dist-packages/wstools- 0.3-py2.6. egg/wstools/XMLSchema. py: 3107: DeprecationWarning: object. __init__ ( ) takes no parameters
  tuple. __init__ ( self , args )
IMPORT:  http://service. soap. rpc. jira. atlassian. com
no schemaLocation attribute in import
IMPORT:  http://beans. soap. rpc. jira. atlassian. com
no schemaLocation attribute in import
IMPORT:  http://jira. mycompany. com: 8080/rpc/soap/jirasoapservice-v2
no schemaLocation attribute in import
IMPORT:  http://schemas. xmlsoap. org/soap/encoding/
no schemaLocation attribute in import
IMPORT:  http://service. soap. rpc. jira. atlassian. com
no schemaLocation attribute in import
IMPORT:  http://beans. soap. rpc. jira. atlassian. com
no schemaLocation attribute in import
IMPORT:  http://exception. rpc. jira. atlassian. com
no schemaLocation attribute in import
IMPORT:  http://schemas. xmlsoap. org/soap/encoding/
no schemaLocation attribute in import
IMPORT:  http://beans. soap. rpc. jira. atlassian. com
no schemaLocation attribute in import
IMPORT:  http://jira. mycompany. com: 8080/rpc/soap/jirasoapservice-v2
no schemaLocation attribute in import
IMPORT:  http://exception. rpc. jira. atlassian. com
no schemaLocation attribute in import
IMPORT:  http://schemas. xmlsoap. org/soap/encoding/
no schemaLocation attribute in import

我不久前将 JIRA Python CLI 代码更改为使用 suds 而不是 SOAPpy,并且没有回头。 SOAPpy 已经很老了,现在似乎不受支持。



相关讨论

  • 尝试将其与有效的问题 id Traceback 一起使用时出现以下错误(最近一次调用最后一次):文件 “jira”,第 1574 行,在 <module> 中返回 “d/d/d d: d: d GMT-1” % (i[0], i[1], i[2], i[3], i[4], i[5]) 类型错误:datetime.datetime 对象不可订阅


声明:本站(华域联盟www.cnhackhy.com)所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。