SOAPpy and ArrayOfString

icius icius at
Sun Jan 21 09:11:31 CET 2007

Hello all,

I am trying to use a web services API with Python and SOAPpy as a
client.  Some of the method paramters in this web service's WSDL are
asking for an "ArrayOfString" type. Here is my code so far:


from SOAPpy import WSDL

wsdlFile =

server = WSDL.Proxy(wsdlFile)

server.soapproxy.config.dumpSOAPOut = 1
server.soapproxy.config.dumpSOAPIn = 1

SID = server.login('srvcdesk', 'xxxxxxxx')

contacts = server.doSelect(SID, 'cnt', "userid = 'abeju01'", 1,
['last_name', 'first_name', 'userid'])

I tried using a simple Python list for the argument that wants
"ArrayOfString".  Python generates the following XML for the last
argument of the "doSelect" command above:

<v5 SOAP-ENC:arrayType="xsd:string[3]" xsi:type="SOAP-ENC:Array">

The web service does not like this at all and returns the following

SOAPpy.Types.faultType: <Fault soapenv:Server.userException:
org.xml.sax.SAXException: Bad types (class [Ljava.lang.Object; -> class
usdjws65.ArrayOfString): >

I know in Perl I had to do some special gyrations to pass the right
structue for ArrayOfString to this same web service.  Is there any way
to force a type in Python or any other ideas on how to do this?

More information about the Python-list mailing list