[suds] how to convert a sudsobject into its representative XML?

Phlip phlip2005 at gmail.com
Thu Jun 17 19:55:20 EDT 2010


[The SUDS mailing list is clogged with spam. F'k'n arms race.]

I'm trying to write a unit test on a view that will respond to SOAPist
commands.

To get there, the test must pass XML as if a SOAP client had cooked it
up and sent it over the wire.

So I have a auth object, like this:

        wsdl = path(__file__).dirname() / 'QBWebConnectorSvc.wsdl'
        wsdl_uri = 'file://' + str(wsdl)
        client = Client(wsdl_uri)
        auth = client.factory.create('authenticate')
        auth.strUserName = 'test'
        auth.strPassword = 'password'

Okay, now call _what_, on or around auth, to convert it to its XML?

I'm sure this is easy, because the SUDS internals must do this all the
time, right?

--
  Phlip
  http://c2.com/cgi/wiki?ZeekLand



More information about the Python-list mailing list