Exemplo n.º 1
0
    def process_service_port(self, xmlelement, force_https=False):
        address_node = xmlelement.find('soap:address', namespaces=self.nsmap)

        # Force the usage of HTTPS when the force_https boolean is true
        location = address_node.get('location')
        if force_https and location:
            location = url_http_to_https(location)
            if location != address_node.get('location'):
                logger.warning("Forcing soap:address location to HTTPS")

        return {'address': location}
Exemplo n.º 2
0
    def process_service_port(self, xmlelement, force_https=False):
        address_node = xmlelement.find("http:address", namespaces=NSMAP)
        if address_node is None:
            raise ValueError("No `http:address` node found")

        # Force the usage of HTTPS when the force_https boolean is true
        location = address_node.get("location")
        if force_https and location:
            location = url_http_to_https(location)
            if location != address_node.get("location"):
                logger.warning("Forcing http:address location to HTTPS")

        return {"address": location}
Exemplo n.º 3
0
    def process_service_port(self, xmlelement, force_https=False):
        address_node = xmlelement.find("soap:address", namespaces=self.nsmap)
        if address_node is None:
            logger.debug("No valid soap:address found for service")
            return

        # Force the usage of HTTPS when the force_https boolean is true
        location = address_node.get("location")
        if force_https and location:
            location = url_http_to_https(location)
            if location != address_node.get("location"):
                logger.warning("Forcing soap:address location to HTTPS")

        return {"address": location}
Exemplo n.º 4
0
    def process_service_port(self, xmlelement, force_https=False):
        address_node = xmlelement.find('soap:address', namespaces=self.nsmap)
        if address_node is None:
            logger.debug("No valid soap:address found for service")
            return

        # Force the usage of HTTPS when the force_https boolean is true
        location = address_node.get('location')
        if force_https and location:
            location = url_http_to_https(location)
            if location != address_node.get('location'):
                logger.warning("Forcing soap:address location to HTTPS")

        return {
            'address': location
        }