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

Phlip phlip2005 at gmail.com
Thu Jun 17 23:44:39 UTC 2010


Sudsters:

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 suds mailing list