Hello I’m just starting with suds and Python,

 

I have a Polymorphic WS width just one entry point  “response PocessMessage(request)”

So I have many classes for different messages to send to the Server

For example,  I have a class “GetUser” with the user name , in response I get a UserObjet with the information for that user.

 

My problem occur if I have an empty message, something like “GetALLUserList”, this message doesn´t have any data

And in response I get an array of user objects.

 

I’m Attaching a small WSDL showing the problem.

And the code looks like this:

 

#

# create a service client using the wsdl.

#

url = 'http://127.0.0.1:8082/?wsdl'

client = Client(url, username='admin', password='password', cache=None)

print client

 

 

#

# create a GetUserRequest object using the wsdl

#

print 'create GetUserRequest'

GetUserRequest = client.factory.create('ns1:GetUserRequest')

GetUserRequest.username='admin'

result=client.service.ProcessMessage(GetUserRequest )

print result

 

#

# create a GetAllUsersRequest object using the wsdl

#

GetAllUsersRequest = client.factory.create('ns1:GetAllUsersRequest')

result2=client.service.ProcessMessage(GetAllUsersRequest)

print result2

 

 

and error occurred when I try to Invoke the ProccessMessage function with and Empty class

 

 

Thanks a lot in advance

 

Victor Gimeno