[Soap-Python] soaplib Array(String)

Remi Jolin rj-soaplib at sysgroup.fr
Wed Jun 22 11:20:35 CEST 2011


Hello,

Le 22/06/2011 10:29, Veres-Szentkiralyi Andras a écrit :
> 2011. június 21. kedd 18:12:41 dátummal Remi Jolin ezt írta:
>> Why don't I get
>>
>>      designations[] =
>>         (stringArray){
>>            string[] =
>>               "AAA",
>>               "BBB",
>>         },
>>
>> The test is done with the latest easy_installable version of soaplib.
> Works for me using Soaplib 2.0 code from GitHub and SUDS 0.3.9. What 
> version
> of SUDS are you using? It would also help to investigate if you'd 
> create a
> dump of the SOAP request and response (either using a proxy or from 
> network
> traffic, e.g. using wireshark or tcpdump).
I'm working with suds 0.4. I upgraded just in case before posting.

By the way, I made some more tests and discovered that I had simplified 
by test too much.
It should be
class Code(ClassModel):
     designations = Array(String, max_occurs=10)
     refs = Array(Integer)

When there is no max_occurs paramter, the result is correct.

Here is the suds debug log :
DEBUG:suds.client:sending to (http://sg1.sysgroup.fr:7789/?wsdl)
message:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ns1="tns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns0:Body>
<ns1:list_code/>
</ns0:Body>
</SOAP-ENV:Envelope>
DEBUG:suds.client:headers = {'SOAPAction': u'"list_code"', 
'Content-Type': 'text/xml; charset=utf-8'}
DEBUG:suds.client:http succeeded:
<?xml version='1.0' encoding='utf-8'?>
<senv:Envelope 
xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing" 
xmlns:tns="tns" 
xmlns:plink="http://schemas.xmlsoap.org/ws/2003/05/partner-link/" 
xmlns:xop="http://www.w3.org/2004/08/xop/include" 
xmlns:senc="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:s1="__main__" 
xmlns:s12env="http://www.w3.org/2003/05/soap-envelope/" 
xmlns:s12enc="http://www.w3.org/2003/05/soap-encoding/" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:senv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"><senv:Body><tns:list_codeResponse><tns:list_codeResult><s1:designations><tns:string>A</tns:string><tns:string>A</tns:string><tns:string>A</tns:string></s1:designations><s1:designations><tns:string>B</tns:string><tns:string>B</tns:string><tns:string>B</tns:string></s1:designations><s1:refs><tns:integer>1</tns:integer><tns:integer>3</tns:integer><tns:integer>6</tns:integer></s1:refs></tns:list_codeResult></tns:list_codeResponse></senv:Body></senv:Envelope> 





More information about the Soap mailing list