[Twisted-Python] WSDL Proxy Send variable names

Kamil Wasilewski kamil at lucem.pl
Tue Mar 2 10:09:39 EST 2010

On Tue, Mar 2, 2010 at 3:48 PM, Landreville
<landreville at deadtreepages.com>wrote:

> On Tue, Mar 2, 2010 at 5:20 AM, Kamil Wasilewski <kamil at lucem.pl> wrote:
> > Hi,
> >  I need to be able to send variable names when sending requests to a SOAP
> > server. Currently SOAPpy sends my variables automatically named as v1,
> v2,
> > v3. The server requires they have a name varNameA, varNameB etc.
> > Here is my outgoing SOAP and code.
> >
> I played around with SOAPpy a couple months ago; I'm fairly sure that
> it does order-based parameters by default and I don't remember finding
> a way to use named parameters.
> There is another SOAP library called ZSI that might have that (it's
> not integrated with Twisted though).
Yes it does order them correctly if you just call
server.doFunction(param1, param2), but assignes them names v1, v2..
But i found a way to name (and order) them

# Define the order of args: needed for this service
server.config.argsOrdering = {'doFunction': ('id', 'code') }
response = server.doFunction(code=sc, id=gi )

Notice however that i need to name my parameters with a '-' in the middle:
country-code, webapi-key and the above naming method gives me errors. if the
variables were country_code it would be a different story.

Any idea how to get around this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20100302/77462b95/attachment-0001.htm 

More information about the Twisted-Python mailing list