SOAPpy, WSDL and objects

Bob.Capa at gmail.com Bob.Capa at gmail.com
Tue Mar 7 11:14:47 EST 2006


Hi,

I am trying to access a webservice which needs a login request of the
following form:

<login>
   <request>
      <firstname>FirstName</firstname>
      <lastname>LastName</lastname>
   </request>
</login>

I am trying to do this with the following code:

from SOAPpy import WSDL
server = WSDL.Proxy(m_url)
request = {'firstname': FirstName,
                'lastname': LastName}
server.login(request)

But this will be sending the following:
<login>
   <v1>
      <firstname>FirstName</firstname>
      <lastname>LastName</lastname>
   </v1>
</login>

Basically, I need to know how to change the code so it generates
'request' instead of 'v1'.

Have a nice evening!




More information about the Python-list mailing list