[Soap-Python] Using arrays with SUDS

azurIt azurit at pobox.sk
Thu Sep 29 17:42:01 CEST 2011


i was discussing this with suds's author and he adviced me (based on WSDL generated by rpclib) to pass array parameters like this:

client.service.testf( {"string": ["ddd", "bbb"]} )

and yes, it works! :)


azur

______________________________________________________________
> Od: "Burak Arslan" <burak.arslan at arskom.com.tr>
> Komu: <soap at python.org>
> Dátum: 27.09.2011 20:48
> Predmet: Re: [Soap-Python] Using arrays with SUDS
>
>On 27.09.2011 21:14, azurIt wrote:
>> So whos fault is this ? suds or rpclib ? What do you recommend if i need arrays ? thnx
>>
>
>oh it's nobody's fault. it's just that suds does not try to hide the 
>intricacies of xml schema serialization from you.
>
>on the rpclib side, Array(String) is for wrapped arrays. 
>String(max_occurs='unbounded') is for simple, unwrapped arrays. choose 
>whatever suits you. if you're going to use suds, i'd choose the latter.
>
>best,
>burak
>
>
>
>> ______________________________________________________________
>>> Od: "Burak Arslan"<burak.arslan at arskom.com.tr>
>>> Komu: azurIt<azurit at pobox.sk>
>>> Dátum: 27.09.2011 16:42
>>> Predmet: Re: [Soap-Python] Using arrays with SUDS
>>>
>>> CC: soap at python.org
>>> On 27.09.2011 15:24, azurIt wrote:
>>>> Hi,
>>>>
>>>> i'm having problems with simple arrays and SUDS client. I have a function with 'array of string' input parameter:
>>>>
>>>> @srpc(Array(String), _returns=String)
>>>> def testf(items):
>>>>     ...
>>>>
>>>> i'm, unfortunately, not able to call it with SUDS. I tried to send Python array (i prefer to use it like this):
>>>>
>>> heh. good luck with that :)
>>>
>>> most of your suds-related questions will be answered here:
>>>
>>> https://github.com/arskom/rpclib/blob/master/src/rpclib/test/interop/test_suds.py
>>>
>>> best,
>>> burak
>>>
>>>
>>>
>> _______________________________________________
>> Soap mailing list
>> Soap at python.org
>> http://mail.python.org/mailman/listinfo/soap
>
>_______________________________________________
>Soap mailing list
>Soap at python.org
>http://mail.python.org/mailman/listinfo/soap
>


More information about the Soap mailing list