MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / Port

Class Port

suds/wsdl.py:773–811  ·  view source on GitHub ↗

Represents a service port. @ivar service: A service. @type service: L{Service} @ivar binding: A binding name. @type binding: str @ivar location: The service location (url). @type location: str

Source from the content-addressed store, hash-verified

771
772
773class Port(NamedObject):
774 """
775 Represents a service port.
776 @ivar service: A service.
777 @type service: L{Service}
778 @ivar binding: A binding name.
779 @type binding: str
780 @ivar location: The service location (url).
781 @type location: str
782 """
783
784 def __init__(self, root, definitions, service):
785 """
786 @param root: An XML root element.
787 @type root: L{Element}
788 @param definitions: A definitions object.
789 @type definitions: L{Definitions}
790 @param service: A service object.
791 @type service: L{Service}
792 """
793 NamedObject.__init__(self, root, definitions)
794 self.__service = service
795 self.binding = root.get('binding')
796 address = root.getChild('address')
797 if address is None:
798 self.location = None
799 else:
800 self.location = address.get('location').encode('utf-8')
801 self.methods = {}
802
803 def method(self, name):
804 """
805 Get a method defined in this portType by name.
806 @param name: A method name.
807 @type name: str
808 @return: The requested method object.
809 @rtype: I{Method}
810 """
811 return self.methods.get(name)
812
813
814class Service(NamedObject):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected