soap constructor invocation simplification

10 views
Skip to first unread message

Alex Bodnaru

unread,
Mar 2, 2014, 8:27:17 PM3/2/14
to pytho...@googlegroups.com

hello christoph, other friends,

i find it too redundant to call the soap connstructor with too many similar parameters.

this may be reduced to one url parameter, the tns.

here is the function as i propose it:

class SoapProtocol(Protocol):
.....................
    def __init__(self, tns=None, typenamespace=None, baseURL=None,             
                 servicename='MyApp'):                                         
        self.tns = tns                                                         
        self.typenamespace = typenamespace or (tns.rstrip('/') + '/types')     
        self.servicename = servicename                                         
        self.baseURL = baseURL or tns                                          
        self._name_mapping = {}                                                
                                                                               
        self.encoder = SoapEncoder(self.typenamespace)                         
                                                                               
please consider,
alex
Reply all
Reply to author
Forward
0 new messages