Beispiel #1
0
    def _get_ws(self, afip_ws):
        """
        Method to be inherited
        """
        ws = super(AfipwsConnection, self)._get_ws(afip_ws)
        if afip_ws == 'wsfe':
            from pyafipws.wsfev1 import WSFEv1
            ws = WSFEv1()
        elif afip_ws == "wsfex":
            from pyafipws.wsfexv1 import WSFEXv1
            ws = WSFEXv1()
        elif afip_ws == "wsmtxca":
            from pyafipws.wsmtx import WSMTXCA
            ws = WSMTXCA()
        elif afip_ws == "wscdc":
            from pyafipws.wscdc import WSCDC
            ws = WSCDC()
        elif afip_ws == "ws_sr_padron_a4":
            from pyafipws.ws_sr_padron import WSSrPadronA4
            ws = WSSrPadronA4()
            if self.type == 'production':
                ws.H**O = False
                ws.WSDL = "https://aws.afip.gov.ar/sr-padron/webservices/personaServiceA4?wsdl"
        elif afip_ws == "ws_sr_constancia_inscripcion":
            from pyafipws.ws_sr_padron import WSSrPadronA5
            ws = WSSrPadronA5()
            if self.type == 'production':
                ws.H**O = False
                ws.WSDL = "https://aws.afip.gov.ar/sr-padron/webservices/personaServiceA5?wsdl"

        return ws