Is there anyway to work around a SOAP method that has the same name as a Python reserved keyword (in this case "del")? I'm calling it like this "client.service.del(options)" and this gets an invalid syntax error. Changing the WSDL is an option, but one I'd rather avoid if there's a better way. Any suggestions?
Thanks.
-- Jason Giangrande System Administrator Clark University
From Jason Giangrande on 01/13/2009 08:51 PM: Is there anyway to work around a SOAP method that has the same name as a Python reserved keyword (in this case "del")? I'm calling it like this "client.service.del(options)" and this gets an invalid syntax error. Changing the WSDL is an option, but one I'd rather avoid if there's a better way. Any suggestions?
Thanks.
-- Jason Giangrande System Administrator Clark University
fedora-suds-list mailing list fedora-suds-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-suds-list
Jeff is probably going to beat me but I couldn't find any decent way to call it. As you stated calling "del" gives a syntax error.
Probably this will have to be renamed to something like _del or del_ to prevent clashing.
As an ugly fix try using:
client.service.__wrapped__.resolve('del')()
Hope this helps.
Cheers
Hey Jason,
I would suggest:
client = Client(url) delete = getattr(client.service, 'del') reply = delete(options)
Regards,
Jeff
Jason Giangrande wrote:
Is there anyway to work around a SOAP method that has the same name as a Python reserved keyword (in this case "del")? I'm calling it like this "client.service.del(options)" and this gets an invalid syntax error. Changing the WSDL is an option, but one I'd rather avoid if there's a better way. Any suggestions?
Thanks.
-- Jason Giangrande System Administrator Clark University
fedora-suds-list mailing list fedora-suds-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-suds-list
Thanks Jeff. That worked perfectly.
Jason
-----Original Message----- From: fedora-suds-list-bounces@redhat.com [mailto:fedora-suds-list- bounces@redhat.com] On Behalf Of Jeff Ortel Sent: Tuesday, January 13, 2009 6:00 PM To: Jason Giangrande Cc: fedora-suds-list@redhat.com Subject: Re: [Fedora-suds-list] SOAP Method Problem
Hey Jason,
I would suggest:
client = Client(url) delete = getattr(client.service, 'del') reply = delete(options)
Regards,
Jeff
Jason Giangrande wrote:
Is there anyway to work around a SOAP method that has the same name as a
Python reserved keyword (in this case "del")? I'm calling it like this "client.service.del(options)" and this gets an invalid syntax error. Changing the WSDL is an option, but one I'd rather avoid if there's a better way. Any suggestions?
Thanks.
-- Jason Giangrande System Administrator Clark University
fedora-suds-list mailing list fedora-suds-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-suds-list
fedora-suds-list mailing list fedora-suds-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-suds-list