How to pass in python dictionaries?

Asked by roadhead on 2012-01-04

Hi jakob,

I would like to pass in an array of key,value pairs to my webservice method. I'm attempting to do this by extending LadonType.

See code & Error here: http://pastie.org/private/vi3qnzoa1v8xbuekonbdpg

See WSDL here: http://pastie.org/private/gtkwqkcntnxjliboag4rlg

What am I missing? Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
ladon Edit question
Assignee:
No assignee Edit question
Solved by:
jsgaarde
Solved:
2012-01-09
Last query:
2012-01-09
Last reply:
2012-01-08
jsgaarde (jakob-simon-gaarde) said : #1

I will answer during the weeken :-)

Best Regards
Jakob Simon-Gaarde

Best jsgaarde (jakob-simon-gaarde) said : #2

Hi Roadhead.

I have put an example in the support portion of the source tree:

http://bazaar.launchpad.net/~ladon-dev-team/ladon/ladon/files/head:/frameworks/python/support/answers/183474/

In your example you put service code and client code into same module. Ladon is not designed to be used like that.
Also you used LadonType as baseclass for you service which will result in a runnung service but makes no sense at all. LadonType descendents are ment to be implemented outside the service class.

All this is illustrated in the support example in the link above.

Also read about LadonTypes on Ladon's website:
http://ladonize.org/index.php/Python_Example

Best Regards
Jakob Simon-Gaarde

roadhead (i-r2-t) said : #3

Hi Jakob,

Thanks for your response. My example was just showing you snippets of code. I had implemented the service, exactly as you describe in your example. The client code is not part of the service code and is run from the python interpreter command line.

Anyway, thanks for the example. My problem went away when I added "http://" to the suds client call. Weird!

Keep up the good work!

roadhead (i-r2-t) said : #4

Thanks jsgaarde, that solved my question.