Logo Search packages:      
Sourcecode: suds version File versions  Download package

def suds::client::ServiceSelector::__find (   self,
  name 
) [private]

Find a I{service} by name (string) or index (integer).
@param name: The name (or index) of a service.
@type name: (int|str)
@return: A L{PortSelector} for the found service.
@rtype: L{PortSelector}. 

Definition at line 318 of file client.py.

00318                           :
        """
        Find a I{service} by name (string) or index (integer).
        @param name: The name (or index) of a service.
        @type name: (int|str)
        @return: A L{PortSelector} for the found service.
        @rtype: L{PortSelector}. 
        """
        service = None
        if not len(self.__services):
            raise Exception, 'No services defined'
        if isinstance(name, int):
            try:
                service = self.__services[name]
                name = service.name
            except IndexError:
                raise ServiceNotFound, 'at [%d]' % name
        else:
            for s in self.__services:
                if name == s.name:
                    service = s
                    break
        if service is None:
            raise ServiceNotFound, name
        return PortSelector(self.__client, service.ports, name)
    
    def __ds(self):


Generated by  Doxygen 1.6.0   Back to index