[Fedora-suds-list] Problem with SOAP response parsing

Jeff Ortel jortel at redhat.com
Thu Mar 25 19:10:33 UTC 2010


I'll step through the reply and see what's happening.

On 03/25/2010 10:19 AM, Elyrwen Dynesh wrote:
> Hello,
>
> I encountered a problem with parsing a SOAP response by suds. It seems
> that suds cannot parse the whole response and returns to a user only a
> part of the response.
>
> In details:
> I have a function popTabularResultRows which is supposed to return a
> list of results (given by rows):
>
> Input:      popTabularResultRows (SOAP:body, use = encoded)
> authString  [ string ]
> requestId  [ int ]
> maxRows  [ int ]
> returnValueInfo  [ boolean ]
> returnValueSid  [ boolean ]
> returnValueIess  [ boolean ]
> Output:     popTabularResultRowsResponse (SOAP:body, use = encoded)
> valueInfo  [ TabularResultValueInfo ]
>
>      * sid  [ nonNegativeInteger ]
>      * iess  [ string ]
>
> rows  [ TabularResultRow ]
>
>      * ts  [ nonNegativeInteger ]
>      * values  (optional, unbounded)  [ TabularResultValue ]
>            o value  [ float ]
>            o valueS64  (optional)  [ long ]
>            o valueU64  (optional)  [ unsignedLong ]
>            o valueDouble  (optional)  [ double ]
>            o qual  [ byte ]
>            o tss  [ int ]
>            o sid  (optional)  [ nonNegativeInteger ]
>            o iess  (optional)  [ string ]
>            o corId  (optional)  [ nonNegativeInteger ]
>
> rowCount  [ int ]
>
> The function is defined in WSDL as follows:
>
> <message name="popTabularResultRows">
> <part name="authString" type="xsd:string"/>
> <part name="requestId" type="xsd:int"/>
> <part name="maxRows" type="xsd:int"/>
> <part name="returnValueInfo" type="xsd:boolean"/>
> <part name="returnValueSid" type="xsd:boolean"/>
> <part name="returnValueIess" type="xsd:boolean"/>
> </message>
>
> With dependencies:
>
> <message name="popTabularResultRowsResponse">
> <part name="valueInfo" type="eds:TabularResultValueInfo"/>
> <part name="rows" type="eds:TabularResultRow"/>
> <part name="rowCount" type="xsd:int"/>
> </message>
>
> And complex types:
>
> <complexType name="TabularResultRow">
> <sequence>
> <element name="ts" type="xsd:nonNegativeInteger" minOccurs="1"
> maxOccurs="1"/>
> <element name="values" type="eds:TabularResultValue" minOccurs="0"
> maxOccurs="unbounded" nillable="true"/>
> </sequence>
> </complexType>
>
> <complexType name="TabularResultValue">
> <sequence>
> <element name="value" type="xsd:float" minOccurs="1" maxOccurs="1"/>
> <element name="valueS64" type="xsd:long" minOccurs="0" maxOccurs="1"
> nillable="true"/>
> <element name="valueU64" type="xsd:unsignedLong" minOccurs="0"
> maxOccurs="1" nillable="true"/>
> <element name="valueDouble" type="xsd:double" minOccurs="0"
> maxOccurs="1" nillable="true"/>
> <element name="qual" type="xsd:byte" minOccurs="1" maxOccurs="1"/>
> <element name="tss" type="xsd:int" minOccurs="1" maxOccurs="1"/>
> <element name="sid" type="xsd:nonNegativeInteger" minOccurs="0"
> maxOccurs="1" nillable="true"/>
> <element name="iess" type="xsd:string" minOccurs="0" maxOccurs="1"
> nillable="true"/>
> <element name="corId" type="xsd:nonNegativeInteger" minOccurs="0"
> maxOccurs="1" nillable="true"/>
> </sequence>
> </complexType>
>
> The problem is that the method popTabularResultRows returns just one
> item in rows wherease the XML that arrives has more items:
>
> *XML response (*/ rows part in italics )/*:*
>
> </SOAP-ENV:Envelope>
> DEBUG:suds.client:headers = {'SOAPAction': u'""', 'Content-Type':
> 'text/xml'}
> DEBUG:suds.client:http succeeded:
> <?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:eds="http://www.tt.com.pl/eds.wsdl">
>
> <SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><eds:
> popTabularResultRowsResponse><valueInfo><sid>3887</sid><iess>testshade01</iess></valueInfo>/<rows><ts>1269425044</ts><values><value>0.000000</value><qual>78</qual><tss>0</tss><iess>testshade01</iess></
> values></rows><rows><ts>1269428644</ts><values><value>0.000000</value><qual>78</qual><tss>0</tss><iess>testshade01</iess></values></rows><rows><ts>1269432244</ts><values><value>0.000000</value><qual>7
> 8</qual><tss>0</tss><iess>testshade01</iess></values></rows><rows><ts>1269435844</ts><values><value>0.000000</value><qual>78</qual><tss>0</tss><iess>testshade01</iess></values></rows><rows><ts>1269439
> 444</ts><values><value>0.000000</value><qual>78</qual><tss>0</tss><iess>testshade01</iess></values></rows><rows><ts>1269443044</ts><values><value>0.000000</value><qual>78</qual><tss>0</tss><iess>tests
> hade01</iess></values></rows>/<rowCount>6</rowCount></eds:popTabularResultRowsResponse>
> </SOAP-ENV:Body>
>
> </SOAP-ENV:Envelope>
>
> *In python when printing the reponse I got (just one row):
> *
> (reply){
>     valueInfo =
>        (TabularResultValueInfo){
>           sid = 3887
>           iess = "testshade01"
>        }
> rows =
>        (TabularResultRow){
>           ts = 1269443044
>           values[] =
>              (TabularResultValue){
>                 value = 0.0
>                 qual = 78
>                 tss = 0
>                 iess = "testshade01"
>              },
>        }
>     rowCount = 6
>   }
> {'ts': [], 'testshade01': []}
>
> What's wrong? Is it a bug?
>
>
>
> _______________________________________________
> suds mailing list
> suds at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/suds

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5126 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.fedoraproject.org/pipermail/suds/attachments/20100325/fca94375/attachment-0001.bin 


More information about the suds mailing list