Menu

#244 ZSI.EvaluateException: Element missing from complexT

v2.0
open
nobody
None
5
2014-12-23
2008-05-27
Ken
No

I having problem with the ZSI SOAP.
ZSI.EvaluateException: Element "_Type" missing from complexType

the "Type" is defined in wsdl and the response xml contains the "Type"
data. Why ZSI complains "Type" missing?

here is the wsdl:

<xsd:complexType name="lbvserverstats">
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="Type" type="xsd:string"/>
<xsd:element name="PrimaryIPAddress" type="xsd:string"/>
<xsd:element name="PrimaryPort" type="xsd:unsignedInt"/>
<xsd:element name="State" type="xsd:string"/>
<xsd:element name="TotHits" type="xsd:unsignedLong"/>
<xsd:element name="hitsRate" type="xsd:unsignedInt"/>
<xsd:element name="CurClntConnections"
type="xsd:unsignedInt"/>
<xsd:element name="CurSrvrConnections"
type="xsd:unsignedInt"/>
<xsd:element name="TotalRequests" type="xsd:unsignedLong"/>
<xsd:element name="requestsRate" type="xsd:unsignedInt"/>
<xsd:element name="TotalResponses" type="xsd:unsignedLong"/>
<xsd:element name="responsesRate" type="xsd:unsignedInt"/>
<xsd:element name="TotalRequestBytes"
type="xsd:unsignedLong"/>
<xsd:element name="requestBytesRate" type="xsd:unsignedInt"/
>
<xsd:element name="TotalResponseBytes"
type="xsd:unsignedLong"/>
<xsd:element name="responseBytesRate" type="xsd:unsignedInt"/
>
<xsd:element name="SoThreshold" type="xsd:unsignedInt"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="lbvserverstatsList">
<xsd:complexContent>
<xsd:restriction base="soapenc:Array">
<xsd:attribute ref="soapenc:arrayType"
wsdl:arrayType="ns:lbvserverstats[]"/>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>

The ZSI output with trace:
<?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:ns="urn:NSConfig"><SOAP-ENV:Header></SOAP-ENV:Header><SOAP-
ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/
encoding/" id="_0"><ns:statlbvserverResponse><return
xsi:type="ns:statlbvserverResult"><rc xsi:type="xsd:unsignedInt">0</
rc><message xsi:type="xsd:string">Done</message><List xsi:type="SOAP-
ENC:Array" SOAP-ENC:offset="[0]" SOAP-
ENC:arrayType="ns:lbvserverstats[4]"><item
xsi:type="ns:lbvserverstats"><name xsi:type="xsd:string">sjcblogsdb</
name><Type xsi:type="xsd:string">TCP</Type><PrimaryIPAddress
xsi:type="xsd:string">10.11.141.247</PrimaryIPAddress><PrimaryPort
xsi:type="xsd:unsignedInt">9090</PrimaryPort><State
xsi:type="xsd:string">UP</State><TotHits
xsi:type="xsd:unsignedLong">277117798</TotHits><hitsRate
xsi:type="xsd:unsignedInt">83</hitsRate><CurClntConnections
xsi:type="xsd:unsignedInt">6113</
CurClntConnections><CurSrvrConnections xsi:type="xsd:unsignedInt">1</
CurSrvrConnections><TotalRequests xsi:type="xsd:unsignedLong">0</
TotalRequests><requestsRate xsi:type="xsd:unsignedInt">0</
requestsRate><TotalResponses xsi:type="xsd:unsignedLong">0</
TotalResponses><responsesRate xsi:type="xsd:unsignedInt">0</
responsesRate><TotalRequestBytes
xsi:type="xsd:unsignedLong">136462617355</
TotalRequestBytes><requestBytesRate xsi:type="xsd:unsignedInt">20605</
requestBytesRate><TotalResponseBytes
xsi:type="xsd:unsignedLong">3240232253526</
TotalResponseBytes><responseBytesRate
xsi:type="xsd:unsignedInt">538963</responseBytesRate><SoThreshold
xsi:type="xsd:unsignedInt">0</SoThreshold></item><item
xsi:type="ns:lbvserverstats"><name xsi:type="xsd:string">sn-
blog03:9090</name><PrimaryIPAddress
xsi:type="xsd:string">10.11.192.27</PrimaryIPAddress><PrimaryPort
xsi:type="xsd:unsignedInt">9090</PrimaryPort><State
xsi:type="xsd:string">UP</State><CurSvcType xsi:type="xsd:string">TCP</
CurSvcType><CurClntConnections xsi:type="xsd:unsignedInt">1644</
CurClntConnections><CurFlags xsi:type="xsd:unsignedInt">604037120</
CurFlags><CurSrvrConnections xsi:type="xsd:unsignedInt">6</
CurSrvrConnections><TotalRequests xsi:type="xsd:unsignedLong">0</
TotalRequests><requestsRate xsi:type="xsd:unsignedInt">0</
requestsRate><TotalResponses xsi:type="xsd:unsignedLong">157516</
TotalResponses><responsesRate xsi:type="xsd:unsignedInt">0</
responsesRate><TotalRequestBytes
xsi:type="xsd:unsignedLong">45437299858</
TotalRequestBytes><requestBytesRate xsi:type="xsd:unsignedInt">17302</
requestBytesRate><TotalResponseBytes
xsi:type="xsd:unsignedLong">1076500932866</
TotalResponseBytes><responseBytesRate
xsi:type="xsd:unsignedInt">21732</responseBytesRate><MaxClients
xsi:type="xsd:unsignedInt">0</MaxClients><SurgeCount
xsi:type="xsd:unsignedInt">0</SurgeCount><CurReusePool
xsi:type="xsd:unsignedInt">0</CurReusePool><AvgSvrTTFB
xsi:type="xsd:unsignedInt">0</AvgSvrTTFB></item><item
xsi:type="ns:lbvserverstats"><name xsi:type="xsd:string">sn-
blog02:9090</name><PrimaryIPAddress
xsi:type="xsd:string">10.11.192.26</PrimaryIPAddress><PrimaryPort
xsi:type="xsd:unsignedInt">9090</PrimaryPort><State
xsi:type="xsd:string">UP</State><CurSvcType xsi:type="xsd:string">TCP</
CurSvcType><CurClntConnections xsi:type="xsd:unsignedInt">2204</
CurClntConnections><CurFlags xsi:type="xsd:unsignedInt">604037120</
CurFlags><CurSrvrConnections xsi:type="xsd:unsignedInt">5</
CurSrvrConnections><TotalRequests xsi:type="xsd:unsignedLong">0</
TotalRequests><requestsRate xsi:type="xsd:unsignedInt">0</
requestsRate><TotalResponses xsi:type="xsd:unsignedLong">157510</
TotalResponses><responsesRate xsi:type="xsd:unsignedInt">0</
responsesRate><TotalRequestBytes
xsi:type="xsd:unsignedLong">45436883015</
TotalRequestBytes><requestBytesRate xsi:type="xsd:unsignedInt">14082</
requestBytesRate><TotalResponseBytes
xsi:type="xsd:unsignedLong">1076215488705</
TotalResponseBytes><responseBytesRate
xsi:type="xsd:unsignedInt">18313</responseBytesRate><MaxClients
xsi:type="xsd:unsignedInt">0</MaxClients><SurgeCount
xsi:type="xsd:unsignedInt">0</SurgeCount><CurReusePool
xsi:type="xsd:unsignedInt">0</CurReusePool><AvgSvrTTFB
xsi:type="xsd:unsignedInt">0</AvgSvrTTFB></item><item
xsi:type="ns:lbvserverstats"><name xsi:type="xsd:string">sn-
blog01:9090</name><PrimaryIPAddress
xsi:type="xsd:string">10.11.192.25</PrimaryIPAddress><PrimaryPort
xsi:type="xsd:unsignedInt">9090</PrimaryPort><State
xsi:type="xsd:string">UP</State><CurSvcType xsi:type="xsd:string">TCP</
CurSvcType><CurClntConnections xsi:type="xsd:unsignedInt">2265</
CurClntConnections><CurFlags xsi:type="xsd:unsignedInt">604037120</
CurFlags><CurSrvrConnections xsi:type="xsd:unsignedInt">4</
CurSrvrConnections><TotalRequests xsi:type="xsd:unsignedLong">0</
TotalRequests><requestsRate xsi:type="xsd:unsignedInt">0</
requestsRate><TotalResponses xsi:type="xsd:unsignedLong">157138</
TotalResponses><responsesRate xsi:type="xsd:unsignedInt">0</
responsesRate><TotalRequestBytes
xsi:type="xsd:unsignedLong">45748815923</
TotalRequestBytes><requestBytesRate xsi:type="xsd:unsignedInt">9989</
requestBytesRate><TotalResponseBytes
xsi:type="xsd:unsignedLong">1087830979135</
TotalResponseBytes><responseBytesRate
xsi:type="xsd:unsignedInt">1038061</responseBytesRate><MaxClients
xsi:type="xsd:unsignedInt">0</MaxClients><SurgeCount
xsi:type="xsd:unsignedInt">0</SurgeCount><CurReusePool
xsi:type="xsd:unsignedInt">0</CurReusePool><AvgSvrTTFB
xsi:type="xsd:unsignedInt">0</AvgSvrTTFB></item></List></return></
ns:statlbvserverResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
Traceback (most recent call last):
File "t2.py", line 18, in <module>
resp = port.statlbvserver(req)
File "/root/soap/NSStat_services.py", line 148, in statlbvserver
response = self.binding.Receive(typecode)
File "/usr/lib/python2.5/site-packages/ZSI-2.0-py2.5.egg/ZSI/
client.py", line 503, in Receive
File "/usr/lib/python2.5/site-packages/ZSI-2.0-py2.5.egg/ZSI/
client.py", line 437, in Receive
File "/usr/lib/python2.5/site-packages/ZSI-2.0-py2.5.egg/ZSI/
parse.py", line 323, in Parse
File "/usr/lib/python2.5/site-packages/ZSI-2.0-py2.5.egg/ZSI/
TCcompound.py", line 201, in parse
File "/usr/lib/python2.5/site-packages/ZSI-2.0-py2.5.egg/ZSI/
TCcompound.py", line 201, in parse
File "/usr/lib/python2.5/site-packages/ZSI-2.0-py2.5.egg/ZSI/
TCcompound.py", line 594, in parse
File "/usr/lib/python2.5/site-packages/ZSI-2.0-py2.5.egg/ZSI/
TCcompound.py", line 234, in parse
ZSI.EvaluateException: Element "_Type" missing from complexType
[Element trace: /SOAP-ENV:Envelope/SOAP-ENV:Body/
ns:statlbvserverResponse/return/List/item[2]]

Discussion


Log in to post a comment.