Save this service port into an xml.dom.Element object.

def save_xml(self, doc, element):
        '''Save this service port into an xml.dom.Element object.'''
        element.setAttributeNS(XSI_NS, XSI_NS_S + 'type', 'rtsExt:serviceport_connector_ext')
        element.setAttributeNS(RTS_NS, RTS_NS_S + 'connectorId',
                               self.connector_id)
        element.setAttributeNS(RTS_NS, RTS_NS_S + 'name', self.name)
        if self.trans_method:
            element.setAttributeNS(RTS_NS, RTS_NS_S + 'transMethod',
                                   self.trans_method)
        if self.comment:
            element.setAttributeNS(RTS_EXT_NS, RTS_EXT_NS_S + 'comment',
                                   self.comment)
        if self.visible != True:
            element.setAttributeNS(RTS_EXT_NS, RTS_EXT_NS_S + 'visible',
                                   str(self.visible).lower())
        new_element = doc.createElementNS(RTS_NS,
                                          RTS_NS_S + 'sourceServicePort')
        self.source_service_port.save_xml(doc, new_element)
        element.appendChild(new_element)
        new_element = doc.createElementNS(RTS_NS,
                                          RTS_NS_S + 'targetServicePort')
        self.target_service_port.save_xml(doc, new_element)
        element.appendChild(new_element)
        for p in self.properties:
            new_prop_element = doc.createElementNS(RTS_EXT_NS,
                                                   RTS_EXT_NS_S + 'Properties')
            properties_to_xml(new_prop_element, p, self.properties[p])
            element.appendChild(new_prop_element)