[Fedora-suds-list] arrayType HowTo ?
Jeff Ortel
jortel at redhat.com
Thu Jul 16 20:37:25 UTC 2009
Uri Shkolnik wrote:
>
>
> --- On Wed, 7/15/09, Uri Shkolnik <urishk at yahoo.com> wrote:
>
>> From: Uri Shkolnik <urishk at yahoo.com>
>> Subject: [Fedora-suds-list] arrayType HowTo ?
>> To: fedora-suds-list at redhat.com
>> Date: Wednesday, July 15, 2009, 12:05 PM
>>
>> Hi,
>>
>> Another newbie question....
>>
>> The WSDL server I work with, have the following schema
>> sub-sections (I tried to write it clearly using plain text)
>> -
>>
>> ======================================================
>> [ sub-section #1 ]
>>
>> searchRequest: (searchRequest){
>> userIdentification =
>> (userIdentification){
>> username = ""
>> password = ""
>> }
>> itineraryArr =
>> (itineraryArray){
>> _arrayType = ""
>> _offset = ""
>> _id = ""
>> _href = ""
>> _arrayType = ""
>> }
>> ...
>> ...
>>
>> ======================================================
>>
>> [ sub-section #2 ]
>>
>> itinerary: (itinerary){
>> departurePoint =
>> (locationPoint){
>> locationId = None
>> radius = None
>> }
>> arrivalPoint =
>> (locationPoint){
>> locationId = None
>> radius = None
>> }
>> ...
>> ...
>> ======================================================
>>
>> There is no problem with 'userIdentification' (which is a
>> "simple" type)
>>
>> But, 'itineraryArr' is an array of 'itinerary', and I don't
>> know how to use python to create XML array.
>>
>> I tried few combinations, for example
I haven't had time to run through this. but, I would try:
>>
>> itinerary0 =
>> self.client.factory.create('itinerary')
>> itineraryArray =
>> self.client.factory.create('itineraryArray')
>> itineraryArray = [itinerary0]
itineraryArray.item = [itinerary0]
>> searchRequest.itineraryArr =
>> itineraryArray
The attribute 'item' does not matter because soap encoding arrays are an unbounded
sequence of <xs:any/>.
>>
>> But all my trials resulted with the same server error -
>>
>> Server raised fault: 'Cannot
>> use object of type itinerary as array'
>> (Fault){
>> faultcode =
>> "SOAP-ENV:Server"
>> faultstring =
>> "Cannot use object of type itinerary as array"
>> }
>>
>>
>> Appreciate you help.....
>>
>> Thanks,
>> Uri
>>
>>
>>
>>
>> _______________________________________________
>> fedora-suds-list mailing list
>> fedora-suds-list at redhat.com
>> https://www.redhat.com/mailman/listinfo/fedora-suds-list
>>
>
> forgot to mention... I tried the solutions from -
>
> https://www.redhat.com/archives/fedora-suds-list/2009-March/msg00018.html
> https://www.redhat.com/archives/fedora-suds-list/2009-March/msg00014.html
>
> and got the same error
>
>
>
>
> _______________________________________________
> fedora-suds-list mailing list
> fedora-suds-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-suds-list
More information about the fedora-suds-list
mailing list