Without seeing the full output of your client's types (print out the client object to see this), I'd suggest using the factory to create a GroupMembersType, then create an attribute called items that contains your list. AFIK this isn't documented anywhere, but it should work for you (my project uses many such calls).

E.g. mems = factory.create(<whatever>)
mems.items = [ your list ]

Then pass it in and see what comes of it. Also in situations like this it's handy to set the retxml option on so you can see the XML on request / response.

Good luck!

--Matt

On Thu, Aug 25, 2011 at 8:44 PM, Carla Cremers <ccremers@innopath.com> wrote:

I am trying to add multiple group members : the wsdl structure is a complex type that looks like this, where the wsdl call accepts 1 or more members.  Is there any way to create an array of members ?   

 

Methods (31):

       (snip)  

       addGroupMembers(xs:long id, GroupMembersType member, )

       (snip)

 

SOAPUI description of WSDL :       

<v5:addGroupMembers>

         <v5:id>19</v5:id>

         <v5:member>

            <!--1 or more repetitions:-->

            <v5:member>12223334466</v5:member>

         </v5:member>

      </v5:addGroupMembers>

I’ve found a number of methods that don’t work :

1 : creating empty list-using factory to create member and append to list : result : suds.WebFault: Server raised fault: '[Server CodecHandler] Failed to decode

-> Found more elements in the soap envelope than required by WSDL

2 : used factory to create member and then attempted to append member :  result : Traceback (most recent call last):

  File "s7.py", line 28, in ?

    member.member.append = "12223334499"

AttributeError: 'str' object has no attribute 'append'

3 : used factory to create 2 members and append 2nd member to first : result :  File "s7.py", line 33, in ?

    member_array = member_array.append(member)

AttributeError: GroupMembersType instance has no attribute 'append'

 

Any clue*4s ?

 

Thanks, Carla


_______________________________________________
suds mailing list
suds@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/suds