By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,758 Members | 1,223 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,758 IT Pros & Developers. It's quick & easy.

problem with python zsi

P: n/a
Hi. I tried earlier to write python zsi mail list, but nobody answered.

I am using ZSI 1.7/2.0rc1 with TTPro Soap SDK. The wsdl file can be found
here:
http://demo.seapine.com/ttsoapcgi.wsdl

My wsdl is the same, only different is the address of the cgi file.

for example i cannot use defectRequest method:

req = getDefectRequest()
req._defectNumber = 140
req._cookie = cookie #cookie is valid int
resp = server.getDefect(req)
What i get:
_________________________________ Wed Mar 15 10:42:17 2006 REQUEST:
<SOAP-ENV:Envelope
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ZSI="http://www.zolera.com/schemas/ZSI/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body
xmlns:ns1="urn:testtrack-interface"><ns1:getDefect><cookie
xsi:type="xsd:long">197437</cookie><defectNumber
xsi:type="xsd:long">140</defectNumber><summary
xsi:nil="1"></summary><bDownloadAttachments
xsi:nil="1"></bDownloadAttachments></ns1:getDefect></SOAP-ENV:Body></SOAP-ENV:Envelope>
_________________________________ Wed Mar 15 10:42:17 2006 RESPONSE:
500
Internal Server Error
-------
Date: Wed, 15 Mar 2006 09:41:37 GMT
Server: Apache/1.3.33 (Debian GNU/Linux)
Content-Length: 586
Content-Type: text/xml; charset=utf-8
Connection: close

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ttns="urn:testtrack-interface"><SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
id="_0"><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>XML
syntax
error</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>
Traceback (most recent call last):
File "./tt.py", line 42, in ?
resp = server.getDefect(req)
File "/home/bluszcz/python/testtrack/ttsoapcgi_services.py", line 285, in
getDefect
response = self.binding.Receive(getDefectResponse.typecode)
File "/usr/lib/python2.4/site-packages/ZSI/client.py", line 415, in
Receive
raise FaultException(msg)
ZSI.FaultException: XML syntax error

The second error:

req = getGlobalUserListRequest()
req._cookie=cookie
resp = server.getGlobalUserList(req)
_________________________________ Wed Mar 15 10:47:15 2006 REQUEST:
<SOAP-ENV:Envelope
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ZSI="http://www.zolera.com/schemas/ZSI/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body
xmlns:ns1="urn:testtrack-interface"><ns1:getGlobalUserList><cookie
xsi:type="xsd:long">197437</cookie></ns1:getGlobalUserList></SOAP-ENV:Body></SOAP-ENV:Envelope>
_________________________________ Wed Mar 15 10:47:15 2006 RESPONSE:
200
OK
-------
Date: Wed, 15 Mar 2006 09:46:34 GMT
Server: Apache/1.3.33 (Debian GNU/Linux)
Content-Length: 537
Content-Type: text/xml; charset=utf-8

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ttns="urn:testtrack-interface"><SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
id="_0"><ttns:getGlobalUserListResponse></ttns:getGlobalUserListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
Traceback (most recent call last):
File "./tt.py", line 40, in ?
resp = server.getGlobalUserList(req)
File "/home/bluszcz/python/testtrack/ttsoapcgi_services.py", line 454, in
getGlobalUserList
response = self.binding.Receive(getGlobalUserListResponse.typ ecode)
File "/usr/lib/python2.4/site-packages/ZSI/client.py", line 421, in
Receive
reply = self.ps.Parse(tc)
File "/usr/lib/python2.4/site-packages/ZSI/parse.py", line 319, in Parse
return how.parse(self.body_root, self)
File "/usr/lib/python2.4/site-packages/ZSI/TCcompound.py", line 199, in
parse
'" missing from struct', ps.Backtrace(elt))
ZSI.EvaluateException: Element "_GlobalUserList" missing from struct
[Element
trace: /SOAP-ENV:Envelope/SOAP-ENV:Body/ttns:getGlobalUserListResponse]

But when I am using ZSI 1.7:
req = getDefectRequestWrapper()
req._defectNumber = 140
req._cookie = int(cookie)
resp = server.getDefect(req)

I got correct XML but python fault:

Traceback (most recent call last):
File "./tt.py", line 47, in ?
resp = server.getDefect(req)
File "/home/bluszcz/python/testtrack/ttsoapcgi_services.py", line 850, in
getDefect
response = self.binding.Receive(getDefectResponseWrapper())
File "/usr/lib/python2.4/site-packages/ZSI/client.py", line 325, in
Receive
return self.ps.Parse(tc)
File "/usr/lib/python2.4/site-packages/ZSI/parse.py", line 311, in Parse
return how.parse(self.body_root, self)
File "/usr/lib/python2.4/site-packages/ZSI/TCcompound.py", line 107, in
parse
value = what.parse(c_elt, ps)
File "/usr/lib/python2.4/site-packages/ZSI/TCcompound.py", line 107, in
parse
value = what.parse(c_elt, ps)
File "/usr/lib/python2.4/site-packages/ZSI/TCcompound.py", line 327, in
parse
item = self.ofwhat.parse(c, ps)
File "/usr/lib/python2.4/site-packages/ZSI/TCcompound.py", line 72, in
parse
self.checkname(elt, ps)
File "/usr/lib/python2.4/site-packages/ZSI/TC.py", line 141, in checkname
if self.nspname and ns != self.nspname:
AttributeError: CReportedByRecord_Def instance has no attribute 'nspname'

another:
one thing: 1.7 request:
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ZSI="http://www.zolera.com/schemas/ZSI/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" >
<SOAP-ENV:Body>
<getDefect xmlns="urn:testtrack-interface">
<cookie xsi:type="xsd:long">197600</cookie>
<defectNumber xsi:type="xsd:long">140</defectNumber>
</getDefect>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
2.0 request:
<SOAP-ENV:Envelope
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ZSI="http://www.zolera.com/schemas/ZSI/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body
xmlns:ns1="urn:testtrack-interface"><ns1:getDefect><cookie
xsi:type="xsd:long">197644</cookie><defectNumber
xsi:type="xsd:long">140</defectNumber><summary
xsi:nil="1"></summary><bDownloadAttachments
xsi:nil="1"></bDownloadAttachments></ns1:getDefect></SOAP-ENV:Body></SOAP-ENV:Envelope>
according to:
http://sourceforge.net/mailarchive/m...sg_id=10277851

I added:
* if name or 1: *

but now I have got:
Traceback (most recent call last):
File "./tt.py", line 47, in ?
resp = server.getDefect(req)
File "/home/bluszcz/python/testtrack/ttsoapcgi_services.py", line 850, in
getDefect
response = self.binding.Receive(getDefectResponseWrapper())
File "/usr/lib/python2.4/site-packages/ZSI/client.py", line 325, in
Receive
return self.ps.Parse(tc)
File "/usr/lib/python2.4/site-packages/ZSI/parse.py", line 311, in Parse
return how.parse(self.body_root, self)
File "/usr/lib/python2.4/site-packages/ZSI/TCcompound.py", line 111, in
parse
raise e
ZSI.EvaluateException: getDefectResponse._pDefect: pDefect.eventlist: Sorry,
no multi-dimensional arrays
[Element
trace: /SOAP-ENV:Envelope/SOAP-ENV:Body/ttns:getDefectResponse/pDefect/eventlist/item[2]]

--
つた
,,To jest Unix. Daje Ci wystarczająco dużo liny, abyś mógł się powiesić.''
Miquel van Smoorenburg mi*****@cistron.nl
Mar 15 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.