se renombran metodos SOAPService
FossilOrigin-Name: 1f0d5dd62941fb6afaabdc723cb75673e484ee1851e52e20ad955a5ecf5c43a7
This commit is contained in:
		| @@ -21,10 +21,10 @@ __all__ = ['DianClient', | |||||||
|  |  | ||||||
| class SOAPService: | class SOAPService: | ||||||
|  |  | ||||||
|     def get_wsdl(self): |     def wsdl(self): | ||||||
|         raise NotImplementedError() |         raise NotImplementedError() | ||||||
|  |  | ||||||
|     def get_service(self): |     def service(self): | ||||||
|         raise NotImplementedError() |         raise NotImplementedError() | ||||||
|  |  | ||||||
|     def build_response(self, as_dict): |     def build_response(self, as_dict): | ||||||
| @@ -63,10 +63,10 @@ class GetNumberingRange(SOAPService): | |||||||
|     accountCodeT: str |     accountCodeT: str | ||||||
|     softwareCode: str |     softwareCode: str | ||||||
|  |  | ||||||
|     def get_wsdl(self): |     def wsdl(self): | ||||||
|         return 'https://vpfe.dian.gov.co/WcfDianCustomerServices.svc?wsdl' |         return 'https://vpfe.dian.gov.co/WcfDianCustomerServices.svc?wsdl' | ||||||
|  |  | ||||||
|     def get_service(self): |     def service(self): | ||||||
|         return 'GetNumberingRange' |         return 'GetNumberingRange' | ||||||
|  |  | ||||||
|     def build_response(self, as_dict): |     def build_response(self, as_dict): | ||||||
| @@ -78,10 +78,10 @@ class SendBillAsync(SOAPService): | |||||||
|     fileName: str |     fileName: str | ||||||
|     contentFile: str |     contentFile: str | ||||||
|  |  | ||||||
|     def get_wsdl(self): |     def wsdl(self): | ||||||
|         return 'https://vpfe.dian.gov.co/WcfDianCustomerServices.svc?wsdl' |         return 'https://vpfe.dian.gov.co/WcfDianCustomerServices.svc?wsdl' | ||||||
|  |  | ||||||
|     def get_service(self): |     def service(self): | ||||||
|         return 'SendBillAsync' |         return 'SendBillAsync' | ||||||
|  |  | ||||||
|     def build_response(self, as_dict): |     def build_response(self, as_dict): | ||||||
| @@ -106,10 +106,10 @@ class SendTestSetAsync(SOAPService): | |||||||
|     contentFile: str |     contentFile: str | ||||||
|     testSetId: str = '' |     testSetId: str = '' | ||||||
|  |  | ||||||
|     def get_wsdl(self): |     def wsdl(self): | ||||||
|         return 'https://vpfe.dian.gov.co/WcfDianCustomerServices.svc?wsdl' |         return 'https://vpfe.dian.gov.co/WcfDianCustomerServices.svc?wsdl' | ||||||
|  |  | ||||||
|     def get_service(self): |     def service(self): | ||||||
|         return 'SendTestSetAsync' |         return 'SendTestSetAsync' | ||||||
|  |  | ||||||
|     def build_response(self, as_dict): |     def build_response(self, as_dict): | ||||||
| @@ -120,10 +120,10 @@ class SendBillSync(SOAPService): | |||||||
|     fileName: str |     fileName: str | ||||||
|     contentFile: bytes |     contentFile: bytes | ||||||
|  |  | ||||||
|     def get_wsdl(self): |     def wsdl(self): | ||||||
|         return 'https://vpfe.dian.gov.co/WcfDianCustomerServices.svc?wsdl' |         return 'https://vpfe.dian.gov.co/WcfDianCustomerServices.svc?wsdl' | ||||||
|  |  | ||||||
|     def get_service(self): |     def service(self): | ||||||
|         return 'SendBillSync' |         return 'SendBillSync' | ||||||
|  |  | ||||||
|     def build_response(self, as_dict): |     def build_response(self, as_dict): | ||||||
| @@ -153,10 +153,10 @@ class GetStatusResponse: | |||||||
| class GetStatus(SOAPService): | class GetStatus(SOAPService): | ||||||
|     trackId: bytes |     trackId: bytes | ||||||
|  |  | ||||||
|     def get_wsdl(self): |     def wsdl(self): | ||||||
|         return 'https://vpfe.dian.gov.co/WcfDianCustomerServices.svc?wsdl' |         return 'https://vpfe.dian.gov.co/WcfDianCustomerServices.svc?wsdl' | ||||||
|  |  | ||||||
|     def get_service(self): |     def service(self): | ||||||
|         return 'GetStatus' |         return 'GetStatus' | ||||||
|  |  | ||||||
|     def build_response(self, as_dict): |     def build_response(self, as_dict): | ||||||
| @@ -166,10 +166,10 @@ class GetStatus(SOAPService): | |||||||
| class GetStatusZip(SOAPService): | class GetStatusZip(SOAPService): | ||||||
|     trackId: bytes |     trackId: bytes | ||||||
|  |  | ||||||
|     def get_wsdl(self): |     def wsdl(self): | ||||||
|         return 'https://vpfe.dian.gov.co/WcfDianCustomerServices.svc?wsdl' |         return 'https://vpfe.dian.gov.co/WcfDianCustomerServices.svc?wsdl' | ||||||
|  |  | ||||||
|     def get_service(self): |     def service(self): | ||||||
|         return 'GetStatusZip' |         return 'GetStatusZip' | ||||||
|  |  | ||||||
|     def build_response(self, as_dict): |     def build_response(self, as_dict): | ||||||
| @@ -179,10 +179,10 @@ class GetStatusZip(SOAPService): | |||||||
| class SendNominaSync(SOAPService): | class SendNominaSync(SOAPService): | ||||||
|     contentFile: bytes |     contentFile: bytes | ||||||
|  |  | ||||||
|     def get_wsdl(self): |     def wsdl(self): | ||||||
|         return 'https://vpfe.dian.gov.co/WcfDianCustomerServices.svc?wsdl' |         return 'https://vpfe.dian.gov.co/WcfDianCustomerServices.svc?wsdl' | ||||||
|  |  | ||||||
|     def get_service(self): |     def service(self): | ||||||
|         return 'SendNominaSync' |         return 'SendNominaSync' | ||||||
|  |  | ||||||
|     def build_response(self, as_dict): |     def build_response(self, as_dict): | ||||||
| @@ -193,31 +193,31 @@ class Habilitacion: | |||||||
|     WSDL = 'https://vpfe-hab.dian.gov.co/WcfDianCustomerServices.svc?wsdl' |     WSDL = 'https://vpfe-hab.dian.gov.co/WcfDianCustomerServices.svc?wsdl' | ||||||
|  |  | ||||||
|     class GetNumberingRange(GetNumberingRange): |     class GetNumberingRange(GetNumberingRange): | ||||||
|         def get_wsdl(self): |         def wsdl(self): | ||||||
|             return Habilitacion.WSDL |             return Habilitacion.WSDL | ||||||
|  |  | ||||||
|     class SendBillAsync(SendBillAsync): |     class SendBillAsync(SendBillAsync): | ||||||
|         def get_wsdl(self): |         def wsdl(self): | ||||||
|             return Habilitacion.WSDL |             return Habilitacion.WSDL | ||||||
|  |  | ||||||
|     class SendBillSync(SendBillSync): |     class SendBillSync(SendBillSync): | ||||||
|         def get_wsdl(self): |         def wsdl(self): | ||||||
|             return Habilitacion.WSDL |             return Habilitacion.WSDL | ||||||
|  |  | ||||||
|     class SendTestSetAsync(SendTestSetAsync): |     class SendTestSetAsync(SendTestSetAsync): | ||||||
|         def get_wsdl(self): |         def wsdl(self): | ||||||
|             return Habilitacion.WSDL |             return Habilitacion.WSDL | ||||||
|  |  | ||||||
|     class GetStatus(GetStatus): |     class GetStatus(GetStatus): | ||||||
|         def get_wsdl(self): |         def wsdl(self): | ||||||
|             return Habilitacion.WSDL |             return Habilitacion.WSDL | ||||||
|  |  | ||||||
|     class GetStatusZip(GetStatusZip): |     class GetStatusZip(GetStatusZip): | ||||||
|         def get_wsdl(self): |         def wsdl(self): | ||||||
|             return Habilitacion.WSDL |             return Habilitacion.WSDL | ||||||
|  |  | ||||||
|     class SendNominaSync(SendNominaSync): |     class SendNominaSync(SendNominaSync): | ||||||
|         def get_wsdl(self): |         def wsdl(self): | ||||||
|             return Habilitacion.WSDL |             return Habilitacion.WSDL | ||||||
|  |  | ||||||
| class DianGateway: | class DianGateway: | ||||||
| @@ -226,7 +226,7 @@ class DianGateway: | |||||||
|         raise NotImplementedError() |         raise NotImplementedError() | ||||||
|  |  | ||||||
|     def _remote_service(self, conn, service): |     def _remote_service(self, conn, service): | ||||||
|         return conn.service[service.get_service()] |         return conn.service[service.service()] | ||||||
|  |  | ||||||
|     def _close(self, conn): |     def _close(self, conn): | ||||||
|         return |         return | ||||||
| @@ -250,7 +250,7 @@ class DianClient(DianGateway): | |||||||
|         self._password = password |         self._password = password | ||||||
|  |  | ||||||
|     def _open(self, service): |     def _open(self, service): | ||||||
|         return zeep.Client(service.get_wsdl(), wsse=UsernameToken(self._username, self._password)) |         return zeep.Client(service.wsdl(), wsse=UsernameToken(self._username, self._password)) | ||||||
|  |  | ||||||
|  |  | ||||||
| class DianSignatureClient(DianGateway): | class DianSignatureClient(DianGateway): | ||||||
| @@ -264,7 +264,7 @@ class DianSignatureClient(DianGateway): | |||||||
|         # RESOLUCCION 0004: pagina 756 |         # RESOLUCCION 0004: pagina 756 | ||||||
|         from zeep.wsse import utils |         from zeep.wsse import utils | ||||||
|  |  | ||||||
|         client = zeep.Client(service.get_wsdl(), wsse= |         client = zeep.Client(service.wsdl(), wsse= | ||||||
|                              BinarySignature( |                              BinarySignature( | ||||||
|                                  self.private_key_path, self.public_key_path, self.password, |                                  self.private_key_path, self.public_key_path, self.password, | ||||||
|                                  signature_method=xmlsec.Transform.RSA_SHA256, |                                  signature_method=xmlsec.Transform.RSA_SHA256, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user