[Fedora-suds-list] Empty class

Victor Gimeno vgimeno at seguridata.com
Mon Dec 14 22:50:28 UTC 2009


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/suds/attachments/20091214/7eec40e2/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DemoWS.wsdl
Type: application/octet-stream
Size: 4689 bytes
Desc: DemoWS.wsdl
Url : http://lists.fedoraproject.org/pipermail/suds/attachments/20091214/7eec40e2/attachment.obj 


More information about the suds mailing list