Ticket #63 (closed enhancement: wontfix)

Opened 5 years ago

Last modified 4 years ago

suds should support overloaded methods

Reported by: martin@… Owned by: jortel
Priority: major Milestone: 0.3.4
Component: suds (general) Version: 0.3.3
Keywords: overloading Cc:
Blocked By: Blocking:

Description

Some web services define a method with the same name multiple times expecting different types of parameters. suds should support this.

Change History

comment:1 Changed 5 years ago by jortel

  • Status changed from new to assigned

Support for this has been postponed since most web services don't overload methods. Also WSDL 2.0 does not support overloading at all. With this being said, I'll look into supporting overloaded methods :) Some of the challenges here are:

  • How to handle cases when not all parameters are required (and thus sometimes not passed) or kwargs are used.
  • How to handle cases where methods are overloaded by parameter type and have the same number of params. Since python is untyped, proper signature detection my be impossible.

comment:2 Changed 5 years ago by jortel

  • Resolution set to wontfix
  • Status changed from assigned to closed

comment:3 Changed 4 years ago by conver

I ran into this problem recently. What I ended up doing was modifying the operation detection routine to just prepend an underscore (or more than one depending on the number of overloads) to the name of the method being overloaded. Only about 10 lines of code in a few places and it seemed to solve the problem while avoiding the nastiness of trying to discern which method you want to call based on parameters.

Note: See TracTickets for help on using tickets.