How do I access avariable named "return"?
Holger Wirtz
wirtz at dfn.de
Tue Jun 21 10:01:42 EDT 2005
Hi,
I have a small problem: I have a WSDL file where different functions are
described. It worked perfectly until I have a function which has a
return-value named "return":
Here is my program:
--- cut here ---
from SOAPpy import WSDL
wsdlFile = 'mypbx.wsdl'
server = WSDL.Proxy(wsdlFile)
version=server.Version()
#print version.GatekeeperID # Works fine
#print version.FirmwareVersion # Works also
resp=server.Initialize(user="Wirtz, Holger - DFN-Verein",appl="PySOAP")
print resp
print resp.return
--- cut here ---
When the line "print resp.return" is comented out I got:
<SOAPpy.Types.structType InitializeResponse at 1081322348>: {'return':
'221', 'key': '1424926643'}
But with the "print resp.return" I got:
File "pywsdl.py", line 10
print resp.return
^
SyntaxError: invalid syntax
I think this seems to be a problem due to the use of a forbidden word. But I
have no chance to change the WSDL definition, so: How can I get the
variable resp.return? Any suggestions?
Thanks, Holger
More information about the Python-list
mailing list