[Fedora-suds-list] Empty class

Jeff Ortel jortel at redhat.com
Wed Dec 16 19:28:28 UTC 2009



On 12/14/2009 04:50 PM, Victor Gimeno wrote:
> 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

What kind of error?  Can you provide that stack trace?

>
> Thanks a lot in advance
>
> Victor Gimeno
>
>
>
> _______________________________________________
> fedora-suds-list mailing list
> fedora-suds-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-suds-list

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5126 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.fedoraproject.org/pipermail/suds/attachments/20091216/11e73c56/attachment.bin 


More information about the suds mailing list