472,993 Members | 3,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,993 software developers and data experts.

SOAPpy, client, execute method that has 'complex' input parameter (with list)?

I'am writting a simple SOAP client in python (2.4) using SOAPpy lib.

I've met with this problem:

when I want to send a list of complex type using
some method from WebService(java,WAS),
I'v got an exception:


<Fault Server.generalException: org.xml.sax.SAXException:
WSWS3136E: Error: No deserializer defined for
array type {http://www.w3.org/1999/XMLSchema}instance: >

I understand that this exception comes from WebService
and I know the reason of this exception,

A SOAP request genereted by SOAPpy contains invalid information
about Type of objects (which I've send).


ServerSide (I know a list o methods and data types, so I don't read
server serve method:

sendMyElements(MyClass input)


'MyClass' is a class which contains two fields:
'sessionId' --------- just STRING
'myElements'--------- an array of 'MyElement'


'MyElement' is class which contains some simple string fields (name,


from SOAPpy import WSDL

url =

serv = WSDL.Proxy(url)

print serv.methods.keys()

class MyElement:
def __init__(self,x,y):

class MyClass:
def __init__(self):

#!!!!!!!!!!!!!!!!!!!!!! LOOK THIS LINE
=MyElement("a","a"),MyElement("b","b"),MyElement(" c","")]

print serv.sendMyElements(MyClass())
Look at the line where I create list of elements MyElement,
In python type 'list' is able to store object of any type
(example: [123,"sddsf",MyElement()]),

Maybe this type ('list') gives me to abstract level, cause whey:
list=['a',213,MyElement('as',''),MyElement('adsf',''),My Element('asdsad','')]
print type(list)
for a in list:
print a,type(a)

I get ...
<type 'list'> -------for list, below for list's elements
a <type 'str'>
213 <type 'int'>
<__main__.MyElement instance at 0x00D4ABC0> <type 'instance'>
<__main__.MyElement instance at 0x00D56C10> <type 'instance'>
<__main__.MyElement instance at 0x00D56CD8> <type 'instance'>

Important, the type(MyElement("sadas","sad")) returns <type
and this information (I think) is used by SOAPpy lib while creating
SOAP request,

a piece of SOAP request:
<saveArrayOfData SOAP-ENC:arrayType="xsd:instance[3]"
xsi:type="SOAP-ENC:Array" SOAP-ENC:root="0" id="i2">
<item href="#i4"/>
<item href="#i5"/>
<item href="#i6"/>

I see here, that I'am sending an array of object 'instance'
but a want to send an array of MyElements.

1. What shoud I do send an array of objects only one type (MyElement) ?
- create more strict data type than 'list'?
- force object - an instance of MyElement class to return proper
about 'type' (type(MyElement('','')))

2. Maybe, I should use 'wsdl2py' to create valid structures (but
'wsdl2py' sometimes fails
while parsing my WSDLs - with error RuntimeError: maximum recursion
depth exceeded)

3. Maybe, I should use other library than SOAPpy

Thanks for any help,

Oct 5 '05 #1
0 2191

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Harry George | last post by:
I'm trying to setup a SOAPpy service under xinetd. Has someone done this sort of thing? Didn't find it from google searches or documentation. This is probably a sockets-level issue, but I was...
by: Sameer Deshpande | last post by:
Hi, I am using python SOAPpy module to call a web service. Call to web service gets executed successfully. I am facing a problem if the call to WS results into redirect. I get "HTTPError:...
by: benboals | last post by:
Note: this is in reply to a message from August 2 which i found searching for help on my own problem. I couldn't seem to reply to it, but a friend suggested that simply using the same subject...
by: Steve | last post by:
Hi All, I have a Python script that uses SOAPpy and I'm outputting all of the methods and info about the parameters... I'm having trouble getting information out of the __init__ parameter. ...
by: icius | last post by:
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...
by: linuxprog | last post by:
hi all i'm building a webservice client with soappy when i send some informations it's returns an error here is the informations that generates the error var = SOAPpy.structType()...
by: Alex Ezell | last post by:
Can anyone offer any assistance as to how to convert a basic python dictionary, list, or even tuple into the SOAP type "ArrayOfKeyValue"? I am currently using SOAPpy, but would be willing to...
by: pion | last post by:
Hello I'm trying to make a web service client in python, and so to start out, I found this simple example that are supposed to parse an wsdl file using SOAPPy. I'm using Windows and got SOAPPy...
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.