diff --git a/.classpath b/.classpath
index 8f46daa..cd5b491 100644
--- a/.classpath
+++ b/.classpath
@@ -19,7 +19,7 @@
-
+
@@ -29,5 +29,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs
index 370ae2c..b212398 100644
--- a/.settings/org.eclipse.core.resources.prefs
+++ b/.settings/org.eclipse.core.resources.prefs
@@ -1,2 +1,5 @@
eclipse.preferences.version=1
+encoding//src/main/java=ISO-8859-1
+encoding//src/test/java=ISO-8859-1
+encoding//src/test/resources=ISO-8859-1
encoding/=ISO-8859-1
diff --git a/.settings/org.eclipse.jdt.apt.core.prefs b/.settings/org.eclipse.jdt.apt.core.prefs
new file mode 100644
index 0000000..d4313d4
--- /dev/null
+++ b/.settings/org.eclipse.jdt.apt.core.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.apt.aptEnabled=false
diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs
index 3e4748e..0fb1240 100644
--- a/.settings/org.eclipse.jdt.core.prefs
+++ b/.settings/org.eclipse.jdt.core.prefs
@@ -42,9 +42,9 @@ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.lambda.genericSignature=do not generate
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.shareCommonFinallyBlocks=disabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -169,7 +169,7 @@ org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.processAnnotations=disabled
org.eclipse.jdt.core.compiler.release=disabled
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.storeAnnotations=disabled
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL
diff --git a/.settings/org.eclipse.m2e.core.prefs b/.settings/org.eclipse.m2e.core.prefs
index f897a7f..3e76fb3 100644
--- a/.settings/org.eclipse.m2e.core.prefs
+++ b/.settings/org.eclipse.m2e.core.prefs
@@ -1,4 +1,4 @@
-activeProfiles=
+activeProfiles=release
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..c5f3f6b
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,3 @@
+{
+ "java.configuration.updateBuildConfiguration": "interactive"
+}
\ No newline at end of file
diff --git a/README.md b/README.md
index 995fb6e..53090ad 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,9 @@
-[![Smarter Web](http://sw.com.mx/images/logo.png)](http://sw.com.mx/)
+[![Smarter Web](https://sw.com.mx/hubfs/Webpage/logo-swsapien.svg)](http://sw.com.mx/)
# SDK JAVA #
+Librería JAVA para el consumo de los servicios de SW sapien®.
+
Registrate en sw.com.mx
## Requirementos ##
@@ -25,10 +27,9 @@ Descargas el modulo mediante Maven:
mx.com.sw.services
SW-JAVA
-
0.0.4.1
-
+
```
## Instalación manual (sin Maven) ##
@@ -37,74 +38,40 @@ Descargar el modulo directamente de los siguientes links:
* [Relase Github](https://github.com/lunasoft/sw-sdk-java/releases)
* [Maven](https://oss.sonatype.org/service/local/artifact/maven/redirect?r=releases&g=mx.com.sw.services&a=SW-JAVA&v=0.0.3.4&e=jar)
-Asi como instalar manualmente cada una de las dependencias:
+Así como instalar manualmente cada una de las dependencias:
* [org.json](http://www.json.org/java)
* [httpclient 4.3.6](http://hc.apache.org/downloads.cgi)
* [httpmime 4.3.6](http://hc.apache.org/downloads.cgi)
* [httpasyncclient 4.0.2](http://hc.apache.org/downloads.cgi)
-Alternativamente tambien se cuenta con un archivo JAR en el que se incluyen todas las dependencias, este se encuentra en la carpeta [Relase Github](https://github.com/lunasoft/sw-sdk-java/releases), con el sufijo _"jar-with-dependencies.jar"_
-
+Alternativamente, tambien se cuenta con un archivo JAR en el que se incluyen todas las dependencias, este se encuentra en la carpeta [Relase Github](https://github.com/lunasoft/sw-sdk-java/releases), con el sufijo _"jar-with-dependencies.jar"_
-# Timbrar XML #
-
-```java
-try{
- //Es preferible inicializar el objeto con el usuario y password de nuestra cuenta, en caso contrario se puede incluir solamente el token de acceso
- //Se especifica el base path, esto para consumir el api de pruebas o productivo
- SWStampService sdk = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
- //Si deseas utilizar un proxy customizado, debes agregar dos parametros mas
- //Se inicializa un objeto response, que obtendra la respuesta del api
- SuccessV1Response response = null;
- //Se asigna el resultado de la respuesta a dicho objeto
- //Se ejecuta el metodo "Stamp", que timbrara nuestro comprobante posteriormente sellado, asi como la versión del servicio de timbrado,
- //puede ver mas de estas versiones en el apartado "Versiones de timbrado"
- response = (SuccessV1Response)sdk.Stamp("String o File XML","v1");
- //El objeto response tendra así los atributos:
- // Status: estado de la petición procesada, puede ser : "success", "fail", "error"
- // HttpStatusCode: Codigo de respuesta HTTP del servidor: eg. 200, 400, 500
- // tfd: El campo donde se encuentra el timbre fiscal digital
- if(response.Status.equals("success")){
- System.out.println(response.Status);
- System.out.println(response.HttpStatusCode);
- System.out.println(response.tfd);
- }
- else{
- //En caso de obtener estatus "fail", "error"
- //Se puede identificar el error en los campos message, messageDetail
- System.out.println(response.message);
- System.out.println(response.messageDetail);
- // ***Como observacion***
- //El campo messageDetail puede no incluirse en ciertos errores
- }
-}
-catch(Exception e){
- System.out.println(e.getMessage());
-}
-
-```
-
-## Timbrar CFDI V1 ##
-TimbrarV1 Recibe el contenido de un XML ya emitido (sellado) en formato String ó tambien puede ser en Base64, posteriormente si la factura y el token son correctos devuelve el complemento timbre en un string (TFD), en caso contrario lanza una excepción.
+# Timbrado #
+
+Timbrado
+Métodos mediante los cuales se envía un XML previamente sellado.
+Timbrado CFDI V1
+
+
El método **TimbrarV1** recibe el contenido de un **XML** ya emitido (sellado) en formato **String** o tambien puede ser en **Base64**, posteriormente si la factura y el token son correctos devuelve el complemento timbre en un string (**TFD**), en caso contrario lanza una excepción.
**Timbrar XML en formato string utilizando usuario y contraseña**
```java
try {
//Es preferible inicializar el objeto con el usuario y password de nuestra cuenta, en caso contrario se puede incluir solamente el token de acceso
- //Se especifica el base path, esto para consumir el api de pruebas o productivo
+ //Se especifica el base path, esto para consumir el API de pruebas o productivo
SWStampService sdk = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
- //Se inicializa un objeto response, que obtendra la respuesta del api
+ //Se inicializa un objeto response, que obtendrá la respuesta del API
SuccessV1Response response = null;
//Se asigna el resultado de la respuesta a dicho objeto
- //Se ejecuta el metodo "Stamp", que timbrara nuestro comprobante posteriormente sellado, asi como la versión del servicio de timbrado,
- //puede ver mas de estas versiones en el apartado "Versiones de timbrado"
+ //Se ejecuta el método "Stamp", que timbrara nuestro comprobante posteriormente sellado, así como la versión del servicio de timbrado,
+ //puede ver más de estas versiones en el apartado "Versiones de timbrado"
response = (SuccessV1Response) sdk.Stamp(stringXML, "v1");
- //El objeto response tendra así los atributos:
- // Status: estado de la petición procesada, puede ser : "success", "fail", "error"
- // HttpStatusCode: Codigo de respuesta HTTP del servidor: eg. 200, 400, 500
+ //El objeto response tendrá así los atributos:
+ // Status: estado de la petición procesada, puede ser: "success", "fail", "error"
+ // HttpStatusCode: Código de respuesta HTTP del servidor: eg. 200, 400, 500
// Data: Cuerpo de la respuesta que arroja el servidor
- //En este caso arrojara el complemento timbre: {"tfd":""}
+ //En este caso arrojará el complemento timbre: {"tfd":""}
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.tfd);
@@ -118,19 +85,19 @@ try {
```java
try {
//Es preferible inicializar el objeto con el usuario y password de nuestra cuenta, en caso contrario se puede incluir solamente el token de acceso
- //Se especifica el base path, esto para consumir el api de pruebas o productivo
+ //Se especifica el base path, esto para consumir el API de pruebas o productivo
SWStampService sdk = new SWStampService("T2lYQ0t4L0R....", "http://services.test.sw.com.mx");
- //Se inicializa un objeto response, que obtendra la respuesta del api
+ //Se inicializa un objeto response, que obtendrá la respuesta del API
SuccessV1Response response = null;
//Se asigna el resultado de la respuesta a dicho objeto
- //Se ejecuta el metodo "Stamp", que timbrara nuestro comprobante posteriormente sellado, asi como la versión del servicio de timbrado,
- //puede ver mas de estas versiones en el apartado "Versiones de timbrado"
+ //Se ejecuta el método "Stamp", que timbrara nuestro comprobante posteriormente sellado, así como la versión del servicio de timbrado,
+ //puede ver más de estas versiones en el apartado "Versiones de timbrado"
response = (SuccessV1Response) sdk.Stamp(stringXML, "v1");
- //El objeto response tendra así los atributos:
- // Status: estado de la petición procesada, puede ser : "success", "fail", "error"
- // HttpStatusCode: Codigo de respuesta HTTP del servidor: eg. 200, 400, 500
+ //El objeto response tendrá así los atributos:
+ // Status: estado de la petición procesada, puede ser: "success", "fail", "error"
+ // HttpStatusCode: Código de respuesta HTTP del servidor: eg. 200, 400, 500
// Data: Cuerpo de la respuesta que arroja el servidor
- //En este caso arrojara el complemento timbre: {"tfd":""}
+ //En este caso arrojará el complemento timbre: {"tfd":""}
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.tfd);
@@ -138,29 +105,30 @@ try {
System.out.println(e.getMessage());
}
```
+
-
-
-
-## Timbrar CFDI V2 ##
-TimbrarV2 Recibe el contenido de un XML ya emitido (sellado) en formato String , posteriormente si la factura y el token son correctos devuelve el CFDI ya tibrado, en caso contrario lanza una excepción.
+
+
+Timbrado CFDI V2
+
+
TimbrarV2 Recibe el contenido de un XML ya emitido (sellado) en formato String , posteriormente si la factura y el token son correctos devuelve el CFDI ya timbrado, en caso contrario lanza una excepción.
**Timbrar XML en formato string utilizando usuario y contraseña**
```java
try {
//Es preferible inicializar el objeto con el usuario y password de nuestra cuenta, en caso contrario se puede incluir solamente el token de acceso
- //Se especifica el base path, esto para consumir el api de pruebas o productivo
+ //Se especifica el base path, esto para consumir el API de pruebas o productivo
SWStampService sdk = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
- //Se inicializa un objeto response, que obtendra la respuesta del api
+ //Se inicializa un objeto response, que obtendrá la respuesta del API
SuccessV2Response response = null;
//Se asigna el resultado de la respuesta a dicho objeto
- //Se ejecuta el metodo "Stamp", que timbrara nuestro comprobante posteriormente sellado, asi como la versión del servicio de timbrado,
- //puede ver mas de estas versiones en el apartado "Versiones de timbrado"
+ //Se ejecuta el método "Stamp", que timbrara nuestro comprobante posteriormente sellado, así como la versión del servicio de timbrado,
+ //puede ver más de estas versiones en el apartado "Versiones de timbrado"
response = (SuccessV2Response) sdk.Stamp(stringXML, "v2");
- //El objeto response tendra así los atributos:
- // Status: estado de la petición procesada, puede ser : "success", "fail", "error"
- // HttpStatusCode: Codigo de respuesta HTTP del servidor: eg. 200, 400, 500
+ //El objeto response tendrá así los atributos:
+ // Status: estado de la petición procesada, puede ser: "success", "fail", "error"
+ // HttpStatusCode: Código de respuesta HTTP del servidor: eg. 200, 400, 500
// Data: Cuerpo de la respuesta que arroja el servidor
System.out.println(response.Status);
@@ -177,17 +145,17 @@ try {
```java
try {
//Es preferible inicializar el objeto con el usuario y password de nuestra cuenta, en caso contrario se puede incluir solamente el token de acceso
- //Se especifica el base path, esto para consumir el api de pruebas o productivo
+ //Se especifica el base path, esto para consumir el API de pruebas o productivo
SWStampService sdk = new SWStampService("T2lYQ0t4L0R....", "http://services.test.sw.com.mx");
- //Se inicializa un objeto response, que obtendra la respuesta del api
+ //Se inicializa un objeto response, que obtendrá la respuesta del API
SuccessV2Response response = null;
//Se asigna el resultado de la respuesta a dicho objeto
- //Se ejecuta el metodo "Stamp", que timbrara nuestro comprobante posteriormente sellado, asi como la versión del servicio de timbrado,
- //puede ver mas de estas versiones en el apartado "Versiones de timbrado"
+ //Se ejecuta el método "Stamp", que timbrara nuestro comprobante posteriormente sellado, así como la versión del servicio de timbrado,
+ //puede ver más de estas versiones en el apartado "Versiones de timbrado"
response = (SuccessV2Response) sdk.Stamp(stringXML, "v2");
- //El objeto response tendra así los atributos:
- // Status: estado de la petición procesada, puede ser : "success", "fail", "error"
- // HttpStatusCode: Codigo de respuesta HTTP del servidor: eg. 200, 400, 500
+ //El objeto response tendrá así los atributos:
+ // Status: estado de la petición procesada, puede ser: "success", "fail", "error"
+ // HttpStatusCode: Código de respuesta HTTP del servidor: eg. 200, 400, 500
// Data: Cuerpo de la respuesta que arroja el servidor
System.out.println(response.Status);
@@ -198,25 +166,29 @@ try {
System.out.println(e.getMessage());
}
```
+
-## Timbrar CFDI V3 ##
-TimbrarV3 Recibe el contenido de un XML ya emitido (sellado) en formato String , posteriormente si la factura y el token son correctos devuelve el CFDI ya tibrado, en caso contrario lanza una excepción.
+
+
+Timbrado CFDI V3
+
+
TimbrarV3 Recibe el contenido de un XML ya emitido (sellado) en formato String , posteriormente si la factura y el token son correctos devuelve el CFDI ya timbrado, en caso contrario lanza una excepción.
**Timbrar XML en formato string utilizando usuario y contraseña**
```java
try {
//Es preferible inicializar el objeto con el usuario y password de nuestra cuenta, en caso contrario se puede incluir solamente el token de acceso
- //Se especifica el base path, esto para consumir el api de pruebas o productivo
+ //Se especifica el base path, esto para consumir el API de pruebas o productivo
SWStampService sdk = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
- //Se inicializa un objeto response, que obtendra la respuesta del api
+ //Se inicializa un objeto response, que obtendrá la respuesta del API
SuccessV3Response response = null;
//Se asigna el resultado de la respuesta a dicho objeto
- //Se ejecuta el metodo "Stamp", que timbrara nuestro comprobante posteriormente sellado, asi como la versión del servicio de timbrado,
- //puede ver mas de estas versiones en el apartado "Versiones de timbrado"
+ //Se ejecuta el método "Stamp", que timbrara nuestro comprobante posteriormente sellado, así como la versión del servicio de timbrado,
+ //puede ver más de estas versiones en el apartado "Versiones de timbrado"
response = (SuccessV3Response) sdk.Stamp(stringXML, "v3");
//El objeto response tendra así los atributos:
- // Status: estado de la petición procesada, puede ser : "success", "fail", "error"
- // HttpStatusCode: Codigo de respuesta HTTP del servidor: eg. 200, 400, 500
+ // Status: estado de la petición procesada, puede ser: "success", "fail", "error"
+ // HttpStatusCode: Código de respuesta HTTP del servidor: eg. 200, 400, 500
// Data: Cuerpo de la respuesta que arroja el servidor
System.out.println(response.Status);
@@ -233,17 +205,17 @@ try {
```java
try {
//Es preferible inicializar el objeto con el usuario y password de nuestra cuenta, en caso contrario se puede incluir solamente el token de acceso
- //Se especifica el base path, esto para consumir el api de pruebas o productivo
+ //Se especifica el base path, esto para consumir el API de pruebas o productivo
SWStampService sdk = new SWStampService("T2lYQ0t4L0R....", "http://services.test.sw.com.mx");
- //Se inicializa un objeto response, que obtendra la respuesta del api
+ //Se inicializa un objeto response, que obtendrá la respuesta del API
SuccessV3Response response = null;
//Se asigna el resultado de la respuesta a dicho objeto
- //Se ejecuta el metodo "Stamp", que timbrara nuestro comprobante posteriormente sellado, asi como la versión del servicio de timbrado,
- //puede ver mas de estas versiones en el apartado "Versiones de timbrado"
+ //Se ejecuta el método "Stamp", que timbrara nuestro comprobante posteriormente sellado, así como la versión del servicio de timbrado,
+ //puede ver más de estas versiones en el apartado "Versiones de timbrado"
response = (SuccessV3Response) sdk.Stamp(stringXML, "v3");
- //El objeto response tendra así los atributos:
- // Status: estado de la petición procesada, puede ser : "success", "fail", "error"
- // HttpStatusCode: Codigo de respuesta HTTP del servidor: eg. 200, 400, 500
+ //El objeto response tendrá así los atributos:
+ // Status: estado de la petición procesada, puede ser: "success", "fail", "error"
+ // HttpStatusCode: Código de respuesta HTTP del servidor: eg. 200, 400, 500
// Data: Cuerpo de la respuesta que arroja el servidor
System.out.println(response.Status);
@@ -253,25 +225,29 @@ try {
System.out.println(e.getMessage());
}
```
+
-## Timbrar CFDI V4 ##
-TimbrarV4 Recibe el contenido de un XML ya emitido (sellado) en formato String , posteriormente si la factura y el token son correctos devuelve el cfdi ya timbrado, y campos extras como qr en formato base64, entre otros.
+
+
+Timbrado CFDI V4
+
+
TimbrarV4 Recibe el contenido de un XML ya emitido (sellado) en formato String , posteriormente si la factura y el token son correctos devuelve el CFDI ya timbrado, y campos extras como qr en formato base64, entre otros.
**Timbrar XML en formato string utilizando usuario y contraseña**
```java
try {
//Es preferible inicializar el objeto con el usuario y password de nuestra cuenta, en caso contrario se puede incluir solamente el token de acceso
- //Se especifica el base path, esto para consumir el api de pruebas o productivo
+ //Se especifica el base path, esto para consumir el API de pruebas o productivo
SWStampService sdk = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
- //Se inicializa un objeto response, que obtendra la respuesta del api
+ //Se inicializa un objeto response, que obtendrá la respuesta del api
SuccessV4Response response = null;
//Se asigna el resultado de la respuesta a dicho objeto
- //Se ejecuta el metodo "Stamp", que timbrara nuestro comprobante posteriormente sellado, asi como la versión del servicio de timbrado,
- //puede ver mas de estas versiones en el apartado "Versiones de timbrado"
+ //Se ejecuta el método "Stamp", que timbrara nuestro comprobante posteriormente sellado, así como la versión del servicio de timbrado,
+ //puede ver más de estas versiones en el apartado "Versiones de timbrado"
response = (SuccessV4Response) sdk.Stamp(stringXML, "v4");
//El objeto response tendra así los atributos:
- // Status: estado de la petición procesada, puede ser : "success", "fail", "error"
- // HttpStatusCode: Codigo de respuesta HTTP del servidor: eg. 200, 400, 500
+ // Status: estado de la petición procesada, puede ser: "success", "fail", "error"
+ // HttpStatusCode: Código de respuesta HTTP del servidor: eg. 200, 400, 500
// Data: Cuerpo de la respuesta que arroja el servidor
System.out.println(response.message);
@@ -296,17 +272,17 @@ try {
```java
try {
//Es preferible inicializar el objeto con el usuario y password de nuestra cuenta, en caso contrario se puede incluir solamente el token de acceso
- //Se especifica el base path, esto para consumir el api de pruebas o productivo
+ //Se especifica el base path, esto para consumir el API de pruebas o productivo
SWStampService sdk = new SWStampService("T2lYQ0t4L0R....", "http://services.test.sw.com.mx");
- //Se inicializa un objeto response, que obtendra la respuesta del api
+ //Se inicializa un objeto response, que obtendrá la respuesta del API
SuccessV4Response response = null;
//Se asigna el resultado de la respuesta a dicho objeto
- //Se ejecuta el metodo "Stamp", que timbrara nuestro comprobante posteriormente sellado, asi como la versión del servicio de timbrado,
- //puede ver mas de estas versiones en el apartado "Versiones de timbrado"
+ //Se ejecuta el método "Stamp", que timbrara nuestro comprobante posteriormente sellado, así como la versión del servicio de timbrado,
+ //puede ver más de estas versiones en el apartado "Versiones de timbrado"
response = (SuccessV4Response) sdk.Stamp(stringXML, "v4");
//El objeto response tendra así los atributos:
- // Status: estado de la petición procesada, puede ser : "success", "fail", "error"
- // HttpStatusCode: Codigo de respuesta HTTP del servidor: eg. 200, 400, 500
+ // Status: estado de la petición procesada, puede ser: "success", "fail", "error"
+ // HttpStatusCode: Código de respuesta HTTP del servidor: eg. 200, 400, 500
// Data: Cuerpo de la respuesta que arroja el servidor
System.out.println(response.message);
@@ -324,19 +300,30 @@ try {
System.out.println(e.getMessage());
}
```
+
+
+
+
+
+Emision Timbrado JSON
+
-# Timbrar Json #
Métodos mediante los cuales se envía un string o byte array de un JSON.
-## Timbrar Json v1 ##
-Recibe un String o byte array del JSON.
-Retorna TFD de la factura.
-Ejemplo de uso
+
+
+Timbrado JSON V1
+
+
+* Recibe un String o byte array del JSON.
+* Retorna TFD de la factura.
+* Ejemplo de uso
+
```java
try {
//Es preferible inicializar el objeto con el usuario y password de nuestra cuenta, en caso contrario se puede incluir solamente el token de acceso
- //Se especifica el base path, esto para consumir el api de pruebas o productivo
+ //Se especifica el base path, esto para consumir el API de pruebas o productivo
SWIssueService api = new SWIssueService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
- //Se inicializa un objeto response, que obtendra la respuesta del api
+ //Se inicializa un objeto response, que obtendrá la respuesta del API
SuccessV1Response response = null;
response = (SuccessV1Response) api.IssueJson(stringJson, "v1");
System.out.println(response.Status);
@@ -346,17 +333,23 @@ try {
System.out.println(e.getMessage());
}
```
+
+
+
+
+Timbrado JSON V2
+
+
+* Recibe un String o byte array del JSON.
+* Retorna TFD de la factura.
+* Ejemplo de uso
-## Timbrar Json v2 ##
-Recibe un String o byte array del JSON.
-Retorna TFD y el CFDI.
-Ejemplo de uso
```java
try {
//Es preferible inicializar el objeto con el usuario y password de nuestra cuenta, en caso contrario se puede incluir solamente el token de acceso
- //Se especifica el base path, esto para consumir el api de pruebas o productivo
+ //Se especifica el base path, esto para consumir el API de pruebas o productivo
SWIssueService api = new SWIssueService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
- //Se inicializa un objeto response, que obtendra la respuesta del api
+ //Se inicializa un objeto response, que obtendrá la respuesta del API
SuccessV1Response response = null;
response = (SuccessV1Response) api.IssueJson(stringJson, "v2");
System.out.println(response.Status);
@@ -367,17 +360,22 @@ try {
System.out.println(e.getMessage());
}
```
+
+
+
+Timbrado JSON V3
+
+
+* Recibe un String o byte array del JSON.
+* Retorna CFDI y el TFD ya unidos.
+* Ejemplo de uso
-## Timbrar Json v3 ##
-Recibe un String o byte array del JSON.
-Retorna CFDI y el TFD ya unidos.
-Ejemplo de uso
```java
try {
//Es preferible inicializar el objeto con el usuario y password de nuestra cuenta, en caso contrario se puede incluir solamente el token de acceso
- //Se especifica el base path, esto para consumir el api de pruebas o productivo
+ //Se especifica el base path, esto para consumir el API de pruebas o productivo
SWIssueService api = new SWIssueService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
- //Se inicializa un objeto response, que obtendra la respuesta del api
+ //Se inicializa un objeto response, que obtendrá la respuesta del API
SuccessV1Response response = null;
response = (SuccessV1Response) api.IssueJson(stringJson, "v3");
System.out.println(response.Status);
@@ -387,17 +385,23 @@ try {
System.out.println(e.getMessage());
}
```
+
+
+
+
+Timbrado JSON V4
+
+
+* Recibe un String o byte array del JSON.
+* Retorna CFDI, TFD, CadenaOriginal, noCertificadoSat, noCertificadoCFDI, UUID, selloSAT, selloCFDI, fechaTimbrado y QR.
+* Ejemplo de uso
-## Timbrar Json v4 ##
-Recibe un String o byte array del JSON.
-Retorna CFDI, TFD, CadenaOriginal, noCertificadoSat, noCertificadoCFDI, UUID, selloSAT, selloCFDI, fechaTimbrado y QR.
-Ejemplo de uso
```java
try {
//Es preferible inicializar el objeto con el usuario y password de nuestra cuenta, en caso contrario se puede incluir solamente el token de acceso
- //Se especifica el base path, esto para consumir el api de pruebas o productivo
+ //Se especifica el base path, esto para consumir el API de pruebas o productivo
SWIssueService api = new SWIssueService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
- //Se inicializa un objeto response, que obtendra la respuesta del api
+ //Se inicializa un objeto response, que obtendrá la respuesta del API
SuccessV1Response response = null;
response = (SuccessV1Response) api.IssueJson(stringJson, "v4");
System.out.println(response.Status);
@@ -414,19 +418,30 @@ try {
System.out.println(e.getMessage());
}
```
+
+
+
+
+
+Emisión Timbrado
+
-# Emisión Timbrado XML #
Métodos mediante los cuales se envía un XML sin sellar.
-## Emisión Timbrado v1 ##
-Recibe un String o byte array del XML.
-Retorna TFD de la factura.
-Ejemplo de uso
+
+
+
+Emision Timbrado V1
+
+
+* Recibe un String o byte array del XML.
+* Retorna TFD de la factura.
+* Ejemplo de uso
```java
try {
//Es preferible inicializar el objeto con el usuario y password de nuestra cuenta, en caso contrario se puede incluir solamente el token de acceso
- //Se especifica el base path, esto para consumir el api de pruebas o productivo
+ //Se especifica el base path, esto para consumir el API de pruebas o productivo
SWIssueService api = new SWIssueService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
- //Se inicializa un objeto response, que obtendra la respuesta del api
+ //Se inicializa un objeto response, que obtendrá la respuesta del API
SuccessV1Response response = null;
response = (SuccessV1Response) api.IssueXml(stringXml, "v1");
System.out.println(response.Status);
@@ -436,17 +451,23 @@ try {
System.out.println(e.getMessage());
}
```
+
+
+
+
+Emisión Timbrado V2
+
+
+* Recibe un String o byte array del XML.
+* Retorna TFD y el CFDI.
+* Ejemplo de uso
-## Emisión Timbrado v2 ##
-Recibe un String o byte array del XML.
-Retorna TFD y el CFDI.
-Ejemplo de uso
```java
try {
//Es preferible inicializar el objeto con el usuario y password de nuestra cuenta, en caso contrario se puede incluir solamente el token de acceso
- //Se especifica el base path, esto para consumir el api de pruebas o productivo
+ //Se especifica el base path, esto para consumir el API de pruebas o productivo
SWIssueService api = new SWIssueService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
- //Se inicializa un objeto response, que obtendra la respuesta del api
+ //Se inicializa un objeto response, que obtendrá la respuesta del API
SuccessV1Response response = null;
response = (SuccessV1Response) api.IssueXml(stringXml, "v2");
System.out.println(response.Status);
@@ -457,17 +478,23 @@ try {
System.out.println(e.getMessage());
}
```
+
+
+
+
+Emisión Timbrado V3
+
+
+* Recibe un String o byte array del XML.
+* Retorna CFDI y el TFD ya unidos.
+* Ejemplo de uso
-## Emisión Timbrado v3 ##
-Recibe un String o byte array del XML.
-Retorna CFDI y el TFD ya unidos.
-Ejemplo de uso
```java
try {
//Es preferible inicializar el objeto con el usuario y password de nuestra cuenta, en caso contrario se puede incluir solamente el token de acceso
- //Se especifica el base path, esto para consumir el api de pruebas o productivo
+ //Se especifica el base path, esto para consumir el API de pruebas o productivo
SWIssueService api = new SWIssueService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
- //Se inicializa un objeto response, que obtendra la respuesta del api
+ //Se inicializa un objeto response, que obtendrá la respuesta del API
SuccessV1Response response = null;
response = (SuccessV1Response) api.IssueXml(stringXml, "v3");
System.out.println(response.Status);
@@ -477,17 +504,23 @@ try {
System.out.println(e.getMessage());
}
```
+
+
+
+
+Emisión Timbrado V4
+
+
+* Recibe un String o byte array del XML.
+* Retorna CFDI, TFD, CadenaOriginal, noCertificadoSat, noCertificadoCFDI, UUID, selloSAT, selloCFDI, fechaTimbrado y QR.
+* Ejemplo de uso
-## Emisión Timbrado v4 ##
-Recibe un String o byte array del XML.
-Retorna CFDI, TFD, CadenaOriginal, noCertificadoSat, noCertificadoCFDI, UUID, selloSAT, selloCFDI, fechaTimbrado y QR.
-Ejemplo de uso
```java
try {
//Es preferible inicializar el objeto con el usuario y password de nuestra cuenta, en caso contrario se puede incluir solamente el token de acceso
- //Se especifica el base path, esto para consumir el api de pruebas o productivo
+ //Se especifica el base path, esto para consumir el API de pruebas o productivo
SWIssueService api = new SWIssueService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
- //Se inicializa un objeto response, que obtendra la respuesta del api
+ //Se inicializa un objeto response, que obtendrá la respuesta del API
SuccessV1Response response = null;
response = (SuccessV1Response) api.IssueXml(stringXml, "v4");
System.out.println(response.Status);
@@ -504,17 +537,37 @@ try {
System.out.println(e.getMessage());
}
```
+
+
+
+:pushpin: ***NOTA:*** Existen varias versiones de respuesta, las cuales son las siguientes:
+
+| Version | Respuesta |
+|---------|---------------------------------------------------------------|
+| V1 | Devuelve el timbre fiscal digital |
+| V2 | Devuelve el timbre fiscal digital y el CFDI timbrado |
+| V3 | Devuelve el CFDI timbrado |
+| V4 | Devuelve todos los datos del timbrado |
+
+Para mayor referencia de estas versiones de respuesta, favor de visitar el siguiente [link](https://developers.sw.com.mx/knowledge-base/versiones-de-respuesta-timbrado/).
+
# Cancelación #
-## Cancelacion CSD ##
-Recibe los archivos CSD y KEY en Base64, password, asi como el rfc emisor y el UUID del CFDI a cancelar
+Este servicio se utiliza para cancelar CFDI, aquí los métodos que se ofrecen:
+
+
+
+Cancelacion CSD
+
+
+- Recibe los archivos CSD y KEY en Base64, password, así como el RFC Emisor, el motivo, el folio de sustitución y el UUID del CFDI a cancelar
```java
SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
CancelationResponse response = null;
-response = (CancelationResponse) app.Cancelation(uuid, password_csd, rfc, b64Cer, b64Key);
+response = (CancelationResponse) app.Cancelation(uuid, password_csd, rfc, b64Cer, b64Key, motivo, foliosustitucion);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
@@ -525,9 +578,13 @@ System.out.println(response.uuidStatusCode);
System.out.println(response.message);
System.out.println(response.messageDetail);
```
+
+
+
+Cancelacion XML
+
-## Cancelación XML ##
-Recibe el XML de cancelacion
+- Recibe el XML de cancelacion
```java
SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
@@ -545,15 +602,20 @@ System.out.println(response.uuidStatusCode);
System.out.println(response.message);
System.out.println(response.messageDetail);
```
+
+
+
+
+Cancelacion PFX
+
-## Cancelacion Pfx ##
-Recibe el Pfx (.pfx, password), asi como el rfc emisor y el UUID del CFDI a cancelar
+- Recibe el Pfx (.pfx, password), así como el RFC Emisor, el motivo, el folio de sustitución y el UUID del CFDI a cancelar
```java
SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
CancelationResponse response = null;
-response = (CancelationResponse) app.Cancelation(uuid, password_csd, rfc, b64Pfx);
+response = (CancelationResponse) app.Cancelation(uuid, password_csd, rfc, b64Pfx, motivo, foliosustitucion);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.acuse);
@@ -563,16 +625,19 @@ System.out.println(response.uuidStatusCode);
System.out.println(response.message);
System.out.println(response.messageDetail);
```
+
+
+
+Cancelacion UUID
+
-
-## Cancelacion Uuid ##
-Recibe el rfc emisor y el UUID del CFDI a cancelar (Los archivos .Cer y .Key deben estar en tu administrador de timbres).
+- Recibe el RFC Emisor, el motivo, el folio de sustitución y el UUID del CFDI a cancelar (Los archivos .Cer y .Key deben estar en tu administrador de timbres).
```java
SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
CancelationResponse response = null;
-response = (CancelationResponse) app.Cancelation(uuid, rfc);
+response = (CancelationResponse) app.Cancelation(uuid, rfc, motivo, foliosustitucion);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.acuse);
@@ -582,16 +647,22 @@ System.out.println(response.uuidStatusCode);
System.out.println(response.message);
System.out.println(response.messageDetail);
```
+
# Validación #
-## Validación Xml ##
-Recibe el Xml del CFDI a validar.
-
->La respuesta vendrá representada con datos planos y un par de listas anidadas. Para obtener la información de las mismas se iterará.
+Este servicio recibe un comprobante CFDI 4.0 en formato XML mediante el cual se valida integridad, sello, errores de estructura, matriz de errores del SAT incluyendo complementos, se valida su validez ante el SAT.
+
+
Ejemplo de uso
+
+
+- Recibe el XML del CFDI a validar.
+- La respuesta vendrá representada con datos planos y un par de listas anidadas. Para obtener la información de las mismas se iterará.
+
+- Ejemplo de uso
```java
SWValidateService api = new SWValidateService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
@@ -621,8 +692,15 @@ System.out.println(response.statusCodeSat);
System.out.println(response.message);
System.out.println(response.messageDetail);
```
+
+
# Consulta de Saldos #
Se obtiene el balance de nuestra cuenta con respecto a los timbres
+
+
+Ejemplo de uso
+
+
```java
SWBalanceAccountService app = new SWBalanceAccountService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
BalanceAcctResponse response = null;
@@ -640,15 +718,21 @@ System.out.println(response.unlimited);
System.out.println(response.message);
System.out.println(response.messageDetail);
```
+
-# Status CFDI #
+# Estatus CFDI #
Método necesario para conocer el estado de un CFDI a través del servicio de consulta del SAT.
Será necesario conocer el RFC emisor, RFC receptor, total de la factura, y UUID de la factura que vamos a consultar. [Este servicio es consumido directamente del SAT].
+
+
+Ejemplo de uso
+
+
```java
StatusCfdiService app = new StatusCfdiService("https://consultaqr.facturaelectronica.sat.gob.mx/ConsultaCFDIService.svc", "http://tempuri.org/IConsultaCFDIService/Consulta");
StatusCfdiResponse response = null;
-response = (StatusCfdiResponse) app.StatusCfdi("LSO1306189R5", "LSO1306189R5", "1.16", "E0AAE6B3-43CC-4B9C-B229-7E221000E2BB");
+response = (StatusCfdiResponse) app.StatusCfdi("rfcEmisor", "rfcReceptor", "0.0", "E0AAE6B3-43CC-4B9C-B229-7E221000E2BB");
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.codigoEstatus);
@@ -659,12 +743,18 @@ System.out.println(response.estatusCancelacion);
System.out.println(response.message);
System.out.println(response.messageDetail);
```
+
# CFDI Relacionados #
Método necesario para conocer los CFDI relacionados que existen a una factura. Con el nuevo método de cancelación, no se podrá cancelar una factura si existen CFDI que lo relacionen.
-## CFDI Relacionados por CSD ##
+
+
+CFDI Relacionados por CSD
+
+
Para el consumo a través de este método necesitaremos el UUID de la factura, RFC emisor, Certificado en base64, Llave en base64 y Password del Certificado.
+* Ejemplo de uso:
```java
SWRelationsService app = new SWRelationsService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
CfdiRelacionadosResponse response = null;
@@ -694,45 +784,19 @@ for (int i = 0; i < hijos.size(); i++) {
System.out.println(response.message);
System.out.println(response.messageDetail);
```
+
+
+
+CFDI Relacionados por PFX
+
-## CFDI Relacionados por PFX ##
Para el consumo a través de este método necesitaremos el UUID de la factura, RFC emisor, PFX en base64 y Password del Certificado.
-```java
-SWRelationsService app = new SWRelationsService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
-CfdiRelacionadosResponse response = null;
-response = (CfdiRelacionadosResponse) app.CfdiRelacionadosPFX(uuid, password_csd, rfc, b64Pfx);
-System.out.println(response.Status);
-System.out.println(response.HttpStatusCode);
-System.out.println(response.resultado);
-LinkedList < RelacionData > padres = (LinkedList < RelacionData > ) response.uuidsRelacionadosPadres;
-if (padres != null) {
- for (int i = 0; i < padres.size(); i++) {
- RelacionData datos = padres.get(i);
- System.out.println(datos.uuid);
- System.out.println(datos.rfcEmisor);
- System.out.println(datos.rfcReceptor);
- }
-}
-LinkedList < RelacionData > hijos = (LinkedList < RelacionData > ) response.uuidsRelacionadosHijos;
-if (hijos != null) {
- for (int i = 0; i < hijos.size(); i++) {
- RelacionData datos = hijos.get(i);
- System.out.println(datos.uuid);
- System.out.println(datos.rfcEmisor);
- System.out.println(datos.rfcReceptor);
- }
-}
-//En caso de obtener error, este puede obtenerse de los siguientes campos
-System.out.println(response.message);
-System.out.println(response.messageDetail);
-```
+* Ejemplo de uso
-## CFDI Relacionados por XML ##
-Para el consumo a través de este método necesitaremos el XML.
```java
SWRelationsService app = new SWRelationsService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
CfdiRelacionadosResponse response = null;
-response = (CfdiRelacionadosResponse) app.CfdiRelacionadosXML(xmlRelacionados);
+response = (CfdiRelacionadosResponse) app.CfdiRelacionadosPFX(uuid, password_csd, rfc, b64Pfx);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.resultado);
@@ -758,45 +822,20 @@ if (hijos != null) {
System.out.println(response.message);
System.out.println(response.messageDetail);
```
+
-## CFDI Relacionados por UUID ##
-Para el consumo a través de este método necesitaremos el UUID de la factura, así como el RFC del Emisor.
-```java
-SWRelationsService app = new SWRelationsService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
-CfdiRelacionadosResponse response = null;
-response = (CfdiRelacionadosResponse) app.CfdiRelacionadosUUID(uuid, rfc);
-System.out.println(response.Status);
-System.out.println(response.HttpStatusCode);
-System.out.println(response.resultado);
-LinkedList < RelacionData > padres = (LinkedList < RelacionData > ) response.uuidsRelacionadosPadres;
-if (padres != null) {
- for (int i = 0; i < padres.size(); i++) {
- RelacionData datos = padres.get(i);
- System.out.println(datos.uuid);
- System.out.println(datos.rfcEmisor);
- System.out.println(datos.rfcReceptor);
- }
-}
-LinkedList < RelacionData > hijos = (LinkedList < RelacionData > ) response.uuidsRelacionadosHijos;
-if (hijos != null) {
- for (int i = 0; i < hijos.size(); i++) {
- RelacionData datos = hijos.get(i);
- System.out.println(datos.uuid);
- System.out.println(datos.rfcEmisor);
- System.out.println(datos.rfcReceptor);
- }
-}
-//En caso de obtener error, este puede obtenerse de los siguientes campos
-System.out.println(response.message);
-System.out.println(response.messageDetail);
-```
# Consulta Pendientes por Aceptar/Rechazar #
Este servicio devuelve una lista con los UUID que tiene pendientes por Aceptación/Rechazo un RFC.
Para el consumo de este método necesitaremos el RFC del cual consultaremos las facturas que tiene por Aceptar/Rechazar.
+
+
+Ejemplo de uso
+
+
```java
SWPendingsService app = new SWPendingsService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
-String rfc = "LAN7008173R5";
+String rfc = "CACX7605101P8";
PendientesCancelarResponse response = null;
response = (PendientesCancelarResponse) app.PendientesPorCancelar(rfc);
System.out.println(response.Status);
@@ -814,11 +853,15 @@ if (uuids != null) {
System.out.println(response.message);
System.out.println(response.messageDetail);
```
+
-# Aceptar/Rechazar #
+## Aceptar/Rechazar ##
Método para Aceptar o Rechazar una o más facturas.
-## Aceptar/Rechazar CSD #
+
+
+Aceptar/Rechazar por CSD
+
Para el consumo a través de este método necesitaremos el un **Map** con los UUID y la acción a realizar, **password** del certificado, **RFC** emisor, certificado en base64, llave en base64.
```java
@@ -843,8 +886,13 @@ System.out.println(response.acuse);
System.out.println(response.message);
System.out.println(response.messageDetail);
```
+
+
+
+
+Aceptar/Rechazar por PFX
+
-## Aceptar/Rechazar PFX #
Para el consumo a través de este método necesitaremos el un **Map** con los UUID y la acción a realizar, **password** del certificado, **RFC** emisor, **PFX** en base64.
```java
@@ -869,8 +917,12 @@ System.out.println(response.acuse);
System.out.println(response.message);
System.out.println(response.messageDetail);
```
+
-## Aceptar/Rechazar XML #
+
+
+Aceptar/Rechazar por XML
+
Para el consumo a través de este método necesitaremos el XML para la Aceptación/Rechazo.
```java
@@ -893,8 +945,13 @@ System.out.println(response.acuse);
System.out.println(response.message);
System.out.println(response.messageDetail);
```
+
+
+
+
+Aceptar/Rechazar por UUID
+
-## Aceptar/Rechazar UUID #
Para el consumo a través de este método necesitaremos el un **String** con el UUID y la acción a realizar, así como el **RFC** emisor.
```java
@@ -917,6 +974,26 @@ System.out.println(response.acuse);
System.out.println(response.message);
System.out.println(response.messageDetail);
```
+
+
+# Recuperar XML por UUID #
+Método para recuperar la información de un XML enviando el UUID de la factura, así como el token de la cuenta en la cual fue timbrada.
+
+
+Ejemplo de uso
+
+
+```java
+SWStorageService storage = new SWStorageService(Utils.tokenSW, Utils.urlApiSW, null, 0);
+StorageResponse response = (StorageResponse) storage.getXml(UUID.fromString("c75f87db-e059-4a7c-a922-e4b9c871e8c1"));
+System.out.println(response.Status);
+System.out.println(response.HttpStatusCode);
+System.out.println(response.getData);
+//En caso de obtener un error, este puede obtenerse de los campos
+System.out.println(response.message);
+System.out.println(response.messageDetail);
+```
+
# Servicio PDF #
Servicio para generar PDF de un XML previamente timbrado.
@@ -931,27 +1008,47 @@ Se permite especificar una de las plantillas genericas o una plantilla personali
```java
SWPdfService app = new SWPdfService(Utils.tokenSW, "http://api.test.sw.com.mx");
```
-## Generar PDF Default
+
+
+
+Generar PDF Default
+
+
Generar PDF con plantilla por defecto CFDI 4.0.
```java
PdfResponse response = null;
response = (PdfResponse) app.GeneratePdf(stamp.cfdi, this.logoB64);
```
-## Generar PDF Default Extras
+
+
+
+Generar PDF Default Extras
+
+
Generar PDF con plantilla por defecto CFDI 4.0 con datos adicionales.
```java
HashMap extras = new HashMap();
PdfResponse response = null;
response = (PdfResponse) app.GeneratePdf(stamp.cfdi, this.logoB64, extras);
```
-## Generar PDF Plantilla Generica.
+
+
+
+Generar PDF Plantilla Generica.
+
+
Generar PDF con plantilla generica.
```java
HashMap extras = new HashMap();
PdfResponse response = null;
response = (PdfResponse) app.GeneratePdf(stamp.cfdi, PdfTemplates.payment20, this.logoB64, extras);
```
-## Generar PDF Plantilla Personalizada
+
+
+
+Generar PDF Plantilla Personalizada
+
+
Generar PDF especificando una plantilla como string.
```java
HashMap extras = new HashMap();
diff --git a/pom.xml b/pom.xml
index 72697c6..5dba094 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
ISO-8859-1
SW-JAVA
- 1.0.7.2
+ 1.0.11.1
jar
https://github.com/lunasoft/sw-sdk-java
@@ -96,7 +96,7 @@
org.apache.maven.plugins
maven-gpg-plugin
- 1.5
+ 1.6
sign-artifacts
@@ -106,6 +106,14 @@
+
+ true
+
+ --batch
+ --pinentry-mode
+ loopback
+
+
org.sonatype.plugins
@@ -143,6 +151,11 @@
+
+ false
+ false
+ false
+
@@ -202,77 +215,84 @@
gson
2.8.9
+
+ com.googlecode.json-simple
+ json-simple
+ 1.1
+
-
-
- release
-
-
-
- org.apache.maven.plugins
- maven-gpg-plugin
- 1.5
-
-
- sign-artifacts
- verify
-
- sign
-
-
-
- --batch
- --pinentry-mode
- loopback
-
-
-
-
-
-
- org.sonatype.plugins
- nexus-staging-maven-plugin
- 1.6.7
- true
-
- ossrh
- https://oss.sonatype.org/
- true
-
-
-
- org.apache.maven.plugins
- maven-source-plugin
- 2.2.1
-
-
- attach-sources
-
- jar-no-fork
-
-
-
-
-
- org.apache.maven.plugins
- maven-javadoc-plugin
- 2.9.1
-
-
- attach-javadocs
-
- jar
-
-
-
-
- false
- false
- 1.6
-
-
-
-
-
-
+
+
+ release
+
+
+
+ org.apache.maven.plugins
+ maven-gpg-plugin
+ 1.6
+
+
+ sign-artifacts
+ verify
+
+ sign
+
+
+ true
+
+ --batch
+ --pinentry-mode
+ loopback
+
+
+
+
+
+
+ org.sonatype.plugins
+ nexus-staging-maven-plugin
+ 1.6.7
+ true
+
+ ossrh
+ https://oss.sonatype.org/
+ true
+
+
+
+ org.apache.maven.plugins
+ maven-source-plugin
+ 2.2.1
+
+
+ attach-sources
+
+ jar-no-fork
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.10.3
+
+
+ attach-javadocs
+
+ jar
+
+
+
+
+ false
+ false
+ false
+ 1.7
+
+
+
+
+
+
diff --git a/src/main/java/Services/Pdf/SWPdfService.java b/src/main/java/Services/Pdf/SWPdfService.java
index bd4a46d..ec3f1a4 100644
--- a/src/main/java/Services/Pdf/SWPdfService.java
+++ b/src/main/java/Services/Pdf/SWPdfService.java
@@ -116,4 +116,17 @@ public IResponse GeneratePdf(String xml, PdfTemplates templateId, String b64Logo
PdfRequest req = new PdfRequest();
return req.sendRequest(settings);
}
+ /**
+ * Servicio para regenerar el PDF de un comprobante previamente timbrado.
+ * @param uuid UUID del comprobante a regenerar el PDF.
+ * @return {@link} Utils.Responses.Pdf.PdfResponse
+ * @throws GeneralException
+ * @throws AuthException
+ * @throws IOException
+ */
+ public IResponse RegeneratePdf(String uuid) throws GeneralException, AuthException, IOException{
+ PdfOptionsRequest settings = new PdfOptionsRequest(getToken(), uuid, RequestHelper.stringEmptyOrNull(getURIAPI()) ? getURI() : getURIAPI(), getProxyHost(), getProxyPort());
+ PdfRequest request = new PdfRequest();
+ return request.sendRequestUuid(settings);
+ }
}
\ No newline at end of file
diff --git a/src/main/java/Services/SWService.java b/src/main/java/Services/SWService.java
index ab17be0..d8f4267 100644
--- a/src/main/java/Services/SWService.java
+++ b/src/main/java/Services/SWService.java
@@ -114,7 +114,7 @@ protected SWService(String token, String URI) {
protected SWService(String token, String URI, String ProxyHost, int ProxyPort) {
Token = token;
- this.URI = URI;
+ this.URIAPI = URI;
this.ProxyHost = ProxyHost;
this.ProxyPort = ProxyPort;
this.time = new Date((long)999999999*100000);
diff --git a/src/main/java/Services/Stamp/SWStampService.java b/src/main/java/Services/Stamp/SWStampService.java
index 1e68ddf..8b71de2 100644
--- a/src/main/java/Services/Stamp/SWStampService.java
+++ b/src/main/java/Services/Stamp/SWStampService.java
@@ -10,6 +10,8 @@
import java.io.IOException;
import java.nio.charset.Charset;
+import java.nio.file.Files;
+import java.nio.file.Paths;
public class SWStampService extends SWService {
@@ -20,8 +22,9 @@ public SWStampService(String user, String password, String URI) throws AuthExcep
public SWStampService(String token, String URI) {
super(token, URI);
}
-
- public SWStampService(String user, String password, String URI, String proxyHost, int proxyPort) throws AuthException {
+
+ public SWStampService(String user, String password, String URI, String proxyHost, int proxyPort)
+ throws AuthException {
super(user, password, URI, proxyHost, proxyPort);
}
@@ -30,7 +33,8 @@ public SWStampService(String token, String URI, String proxyHost, int proxyPort)
}
public IResponse Stamp(String xml, String version) throws AuthException, GeneralException, IOException {
- StampOptionsRequest settings = new StampOptionsRequest(getToken(), getURI(), xml, version, getProxyHost(), getProxyPort(), false);
+ StampOptionsRequest settings = new StampOptionsRequest(getToken(), getURI(), xml, version, getProxyHost(),
+ getProxyPort(), false);
StampRequest req = new StampRequest();
return req.sendRequest(settings);
}
@@ -38,11 +42,13 @@ public IResponse Stamp(String xml, String version) throws AuthException, General
public IResponse Stamp(String xml, String version, boolean isb64)
throws AuthException, GeneralException, IOException {
if (isb64) {
- StampOptionsRequest settings = new StampOptionsRequest(getToken(), getURI(), xml, version, isb64, getProxyHost(), getProxyPort(), false);
+ StampOptionsRequest settings = new StampOptionsRequest(getToken(), getURI(), xml, version, isb64,
+ getProxyHost(), getProxyPort(), false);
StampRequest req = new StampRequest();
return req.sendRequest(settings);
} else {
- StampOptionsRequest settings = new StampOptionsRequest(getToken(), getURI(), xml, version, getProxyHost(), getProxyPort(), false);
+ StampOptionsRequest settings = new StampOptionsRequest(getToken(), getURI(), xml, version, getProxyHost(),
+ getProxyPort(), false);
StampRequest req = new StampRequest();
return req.sendRequest(settings);
}
@@ -51,16 +57,24 @@ public IResponse Stamp(String xml, String version, boolean isb64)
public IResponse Stamp(byte[] xmlFile, String version, boolean isb64)
throws AuthException, GeneralException, IOException {
String xmlProcess = new String(xmlFile, Charset.forName("UTF-8"));
- StampOptionsRequest settings = new StampOptionsRequest(getToken(), getURI(), xmlProcess, version, getProxyHost(), getProxyPort(), false);
+ StampOptionsRequest settings = new StampOptionsRequest(getToken(), getURI(), xmlProcess, version,
+ getProxyHost(), getProxyPort(), false);
StampRequest req = new StampRequest();
return req.sendRequest(settings);
}
public IResponse Stamp(byte[] xmlFile, String version) throws AuthException, GeneralException, IOException {
String xmlProcess = new String(xmlFile, Charset.forName("UTF-8"));
- StampOptionsRequest settings = new StampOptionsRequest(getToken(), getURI(), xmlProcess, version, getProxyHost(), getProxyPort(), false);
+ StampOptionsRequest settings = new StampOptionsRequest(getToken(), getURI(), xmlProcess, version,
+ getProxyHost(), getProxyPort(), false);
StampRequest req = new StampRequest();
return req.sendRequest(settings);
+ }
+ public IResponse StampZip(byte[] zipFile, String version) throws AuthException, GeneralException, IOException {
+ StampOptionsRequest settings = new StampOptionsRequest(getToken(), getURI(), zipFile, version, getProxyHost(),
+ getProxyPort());
+ StampRequest req = new StampRequest();
+ return req.sendRequestZip(settings);
}
}
\ No newline at end of file
diff --git a/src/main/java/Services/Storage/SWStorageService.java b/src/main/java/Services/Storage/SWStorageService.java
new file mode 100644
index 0000000..bea2f61
--- /dev/null
+++ b/src/main/java/Services/Storage/SWStorageService.java
@@ -0,0 +1,51 @@
+package Services.Storage;
+
+import java.io.IOException;
+import java.util.UUID;
+import Exceptions.AuthException;
+import Exceptions.GeneralException;
+import Services.SWService;
+import Utils.Requests.Storage.StorageOptionsRequest;
+import Utils.Requests.Storage.StorageRequest;
+import Utils.Responses.IResponse;
+
+public class SWStorageService extends SWService {
+ /**
+ * Constructor de la clase.
+ *
+ * @param user correo o usuario de SW
+ * @param password password de SW.
+ * @param URI url base
+ * @param URIAPI base de la API
+ * @param proxyHost ip o dominio de proxy (null si no se utiliza)
+ * @param proxyPort número de puerto de proxy (cualquier valor si proxy es
+ * ull)
+ * @throws AuthException exception en caso de error.
+ */
+ public SWStorageService(String user, String password, String URI, String URIAPI, String proxyHost, int proxyPort)
+ throws AuthException {
+ super(user, password, URI, URIAPI, proxyHost, proxyPort);
+ }
+
+ /**
+ * Constructor de la clase.
+ *
+ * @param token token infinito de SW.
+ * @param URIAPI url base de la API
+ * @param proxyHost ip o dominio de proxy (null si no se utiliza)
+ * @param proxyPort número de puerto de proxy (cualquier valor si proxy es
+ * ull)
+ */
+ public SWStorageService(String token, String URIAPI, String proxyHost, int proxyPort) {
+ super(token, URIAPI, proxyHost, proxyPort);
+ }
+
+ // Metodo para recuperar información de un XML timbrado con SW
+ public IResponse getXml(UUID uuid) throws AuthException, GeneralException, IOException {
+ StorageOptionsRequest settings = new StorageOptionsRequest(getToken(), uuid, getURIAPI(), getProxyHost(),
+ getProxyPort());
+ StorageRequest req = new StorageRequest();
+ req.sendRequest(settings);
+ return req.sendRequest(settings);
+ }
+}
diff --git a/src/main/java/Utils/Constants.java b/src/main/java/Utils/Constants.java
index fb44eba..bb8a962 100644
--- a/src/main/java/Utils/Constants.java
+++ b/src/main/java/Utils/Constants.java
@@ -4,6 +4,7 @@ public class Constants {
public static String BASE_PATH = "http://services.test.sw.com.mx";
public static String AUTH_PATH = "/security/authenticate";
public static String STAMP_PATH = "/cfdi33/stamp/";
+ public static String STAMP_ZIP_PATH = "/cfdi/stamp/v1/zip/";
public static String STAMP_V2_PATH = "/cfdi33/v2/stamp/";
public static String ISSUE_JSON_PATH = "/v3/cfdi33/issue/json/";
public static String ISSUE_XML_PATH = "/cfdi33/issue/";
@@ -24,8 +25,10 @@ public class Constants {
public static String RELACIONADOS_XML_PATH = "/relations/xml";
public static String RELACIONADOS_UUID_PATH = "/relations/";
public static String PENDIENTES_CANCELAR_PATH = "/pendings/";
+ public static String STORAGE_PATH = "/datawarehouse/v1/live/";
public static String TAXPAYERS_PATH = "/taxpayers/";
public static String SAVE_CSD = "/certificates/save";
public static String DISABLE_SEARCH_CSD = "/certificates/";
public static String LIST_CSD = "/certificates";
+ public static String REGENERATE_PDF = "/pdf/v1/api/regeneratepdf/";
}
diff --git a/src/main/java/Utils/Requests/Cancelation/CancelationRequest.java b/src/main/java/Utils/Requests/Cancelation/CancelationRequest.java
index 3c3a0b5..b49528b 100644
--- a/src/main/java/Utils/Requests/Cancelation/CancelationRequest.java
+++ b/src/main/java/Utils/Requests/Cancelation/CancelationRequest.java
@@ -40,14 +40,15 @@ public IResponse sendRequest(IRequest request) throws GeneralException, AuthExce
Charset chars = Charset.forName("UTF-8");
builder.setCharset(chars);
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
- StringEntity sEntity = new StringEntity(
- "{\r\n \"uuid\": \"" + ((CancelationOptionsRequest) request).getUuid() + "\",\r\n \"password\": \""
- + ((CancelationOptionsRequest) request).getPassword() + "\",\r\n \"rfc\": \""
- + ((CancelationOptionsRequest) request).getRfc()+ "\",\r\n \"motivo\": \""
- + ((CancelationOptionsRequest) request).getMotivo()+ "\",\r\n \"foliosustitucion\": \""
- + ((CancelationOptionsRequest) request).getFolioSustitucion()+ "\",\r\n \"b64Cer\": \""
- + ((CancelationOptionsRequest) request).getB64Cer() + "\",\r\n \"b64Key\": \""
- + ((CancelationOptionsRequest) request).getB64key() + "\"\r\n}");
+ JSONObject obj = new JSONObject();
+ obj.put("uuid", ((CancelationOptionsRequest) request).getUuid());
+ obj.put("password", ((CancelationOptionsRequest) request).getPassword());
+ obj.put("rfc", ((CancelationOptionsRequest) request).getRfc());
+ obj.put("motivo", ((CancelationOptionsRequest) request).getMotivo());
+ obj.put("foliosustitucion", (((CancelationOptionsRequest) request).getFolioSustitucion()) != null ? (((CancelationOptionsRequest) request).getFolioSustitucion()) : null);
+ obj.put("b64Cer", ((CancelationOptionsRequest) request).getB64Cer());
+ obj.put("b64Key", ((CancelationOptionsRequest) request).getB64key());
+ StringEntity sEntity = new StringEntity(obj.toString());
httppost.setEntity(builder.build());
httppost.setEntity(sEntity);
RequestHelper.setTimeOut(request.options, (int) sEntity.getContentLength());
@@ -149,13 +150,14 @@ public IResponse sendRequestPfx(IRequest request) throws ClientProtocolException
Charset chars = Charset.forName("UTF-8");
builder.setCharset(chars);
builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
- StringEntity sEntity = new StringEntity(
- "{\r\n \"uuid\": \"" + ((CancelationOptionsRequest) request).getUuid() + "\",\r\n \"password\": \""
- + ((CancelationOptionsRequest) request).getPassword() + "\",\r\n \"rfc\": \""
- + ((CancelationOptionsRequest) request).getRfc() + "\",\r\n \"motivo\": \""
- + ((CancelationOptionsRequest) request).getMotivo()+ "\",\r\n \"foliosustitucion\": \""
- + ((CancelationOptionsRequest) request).getFolioSustitucion() + "\",\r\n \"b64Pfx\": \""
- + ((CancelationOptionsRequest) request).getB64Pfx() + "\"\r\n}");
+ JSONObject obj = new JSONObject();
+ obj.put("uuid", ((CancelationOptionsRequest) request).getUuid());
+ obj.put("password", ((CancelationOptionsRequest) request).getPassword());
+ obj.put("rfc", ((CancelationOptionsRequest) request).getRfc());
+ obj.put("motivo", ((CancelationOptionsRequest) request).getMotivo());
+ obj.put("foliosustitucion", (((CancelationOptionsRequest) request).getFolioSustitucion()) != null ? (((CancelationOptionsRequest) request).getFolioSustitucion()) : null);
+ obj.put("b64Pfx", ((CancelationOptionsRequest) request).getB64Pfx());
+ StringEntity sEntity = new StringEntity(obj.toString());
httppost.setEntity(builder.build());
httppost.setEntity(sEntity);
RequestHelper.setTimeOut(request.options, (int) sEntity.getContentLength());
diff --git a/src/main/java/Utils/Requests/IRequest.java b/src/main/java/Utils/Requests/IRequest.java
index b4115d1..54e633e 100644
--- a/src/main/java/Utils/Requests/IRequest.java
+++ b/src/main/java/Utils/Requests/IRequest.java
@@ -9,6 +9,7 @@ public abstract class IRequest {
public String Password;
public String version;
public String xml;
+ public byte[] XML;
public boolean isb64;
public Builder options = RequestConfig.custom();
public String proxyHost;
@@ -50,7 +51,16 @@ public IRequest(String token, String URI, String xml, String version, String pro
this.proxyHost = proxyHost;
this.proxyPort = proxyPort;
}
-
+
+ public IRequest(String token, String URI, byte[] xml, String version, String proxyHost, int proxyPort) {
+ Token = token;
+ this.URI = URI;
+ this.version = version;
+ this.XML = xml;
+ this.proxyHost = proxyHost;
+ this.proxyPort = proxyPort;
+ }
+
public IRequest(String token, String URI, String proxyHost, int proxyPort) {
Token = token;
this.URI = URI;
diff --git a/src/main/java/Utils/Requests/Pdf/PdfOptionsRequest.java b/src/main/java/Utils/Requests/Pdf/PdfOptionsRequest.java
index a222dbd..697ee22 100644
--- a/src/main/java/Utils/Requests/Pdf/PdfOptionsRequest.java
+++ b/src/main/java/Utils/Requests/Pdf/PdfOptionsRequest.java
@@ -11,6 +11,7 @@ public class PdfOptionsRequest extends IRequest {
private String templateId;
private String b64Logo;
private Map extras;
+ private String uuid;
public PdfOptionsRequest(String token, String URI, String xml, String b64Logo, String proxyHost, int proxyPort) {
super(token, URI + Constants.GENERATE_PDF_PATH, proxyHost, proxyPort);
@@ -32,6 +33,11 @@ public PdfOptionsRequest(String token, String URI, String xml, String templateId
this.extras = extras;
this.templateId = templateId;
}
+ public PdfOptionsRequest(String token, String uuid, String URI, String proxyHost, int proxyPort)
+ {
+ super(token, URI + Constants.REGENERATE_PDF, proxyHost, proxyPort);
+ this.uuid = uuid;
+ }
public String getTemplateId() {
return templateId;
@@ -45,4 +51,7 @@ public String getB64Logo() {
public String getXml() {
return xml;
}
+ public String getUuid(){
+ return uuid;
+ }
}
\ No newline at end of file
diff --git a/src/main/java/Utils/Requests/Pdf/PdfRequest.java b/src/main/java/Utils/Requests/Pdf/PdfRequest.java
index c82b895..2b51327 100644
--- a/src/main/java/Utils/Requests/Pdf/PdfRequest.java
+++ b/src/main/java/Utils/Requests/Pdf/PdfRequest.java
@@ -2,8 +2,6 @@
import java.io.IOException;
import java.nio.charset.Charset;
-import java.util.UUID;
-
import org.apache.http.HttpEntity;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.CloseableHttpResponse;
@@ -13,10 +11,10 @@
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
+import org.apache.http.message.BasicHeader;
import org.apache.http.util.EntityUtils;
import org.json.JSONException;
import org.json.JSONObject;
-
import Exceptions.AuthException;
import Exceptions.GeneralException;
import Utils.Helpers.RequestHelper;
@@ -81,4 +79,36 @@ public IResponse sendRequest(IRequest request) throws GeneralException, AuthExce
throw new GeneralException(500, e.getMessage());
}
}
+ public IResponse sendRequestUuid(IRequest request) throws ClientProtocolException, IOException, GeneralException {
+ try {
+ CloseableHttpClient client = HttpClients.createDefault();
+ HttpPost httppost = new HttpPost(request.URI + ((PdfOptionsRequest) request).getUuid());
+ RequestHelper.setTimeOut(request.options, 4000);
+ RequestHelper.setProxy(request.options, request.proxyHost, request.proxyPort);
+ httppost.setConfig(request.options.build());
+ httppost.setHeader(new BasicHeader("Authorization", "bearer " + request.Token));
+ CloseableHttpResponse responseB = client.execute(httppost);
+
+ HttpEntity entity = responseB.getEntity();
+ String responseString = EntityUtils.toString(entity, "UTF-8");
+ int status = responseB.getStatusLine().getStatusCode();
+ client.close();
+ responseB.close();
+ if (!responseString.isEmpty() && status < 500) {
+ JSONObject body = new JSONObject(responseString);
+ String messageDetail = "";
+ if (status == 200) {
+ return new PdfResponse(status, "success", body.getString("message"), messageDetail);
+ } else {
+ return new PdfResponse(status, "error", body.getString("message"),
+ messageDetail);
+ }
+ } else {
+ return new PdfResponse(status, "error", responseB.getStatusLine().getReasonPhrase(),
+ responseString);
+ }
+ } catch (JSONException e) {
+ throw new GeneralException(500, e.getMessage());
+ }
+ }
}
diff --git a/src/main/java/Utils/Requests/Stamp/StampOptionsRequest.java b/src/main/java/Utils/Requests/Stamp/StampOptionsRequest.java
index 9e658c8..71199b4 100644
--- a/src/main/java/Utils/Requests/Stamp/StampOptionsRequest.java
+++ b/src/main/java/Utils/Requests/Stamp/StampOptionsRequest.java
@@ -5,6 +5,8 @@
public class StampOptionsRequest extends IRequest {
private String xml;
+ private byte[] zipData;
+
public StampOptionsRequest(String token, String URI, String xml, String version, boolean isb64, String proxyHost, int proxyPort, boolean isV2) {
super(token, URI + (isV2 ? Constants.STAMP_V2_PATH : Constants.STAMP_PATH) + version + "/b64", version, isb64, proxyHost, proxyPort);
@@ -17,8 +19,18 @@ public StampOptionsRequest(String token, String URI, String xml, String version,
this.xml = xml;
this.version = version;
}
+
+ public StampOptionsRequest(String token, String URI, byte[] zipData, String version, String proxyHost, int proxyPort) {
+ super(token, URI + (Constants.STAMP_ZIP_PATH) + version, zipData, version, proxyHost, proxyPort);
+ this.zipData = zipData;
+ }
+
public String getXml() {
return xml;
}
+
+ public byte[] getZipData() {
+ return zipData;
+ }
}
\ No newline at end of file
diff --git a/src/main/java/Utils/Requests/Stamp/StampRequest.java b/src/main/java/Utils/Requests/Stamp/StampRequest.java
index e047122..5c605d3 100644
--- a/src/main/java/Utils/Requests/Stamp/StampRequest.java
+++ b/src/main/java/Utils/Requests/Stamp/StampRequest.java
@@ -55,7 +55,7 @@ public IResponse sendRequest(IRequest request) throws GeneralException, AuthExce
int status = responseB.getStatusLine().getStatusCode();
client.close();
responseB.close();
- ResponseStamp R = RespuestaTimbrado.Stamped(request.version.charAt(request.version.length()-1));
+ ResponseStamp R = RespuestaTimbrado.Stamped(request.version.charAt(request.version.length() - 1));
R.setReason(responseB.getStatusLine());
R.setResponse(responseString);
R.setStatus(status);
@@ -69,4 +69,41 @@ public IResponse sendRequest(IRequest request) throws GeneralException, AuthExce
}
}
+
+ public IResponse sendRequestZip(IRequest request) throws GeneralException,
+ AuthException {
+ try {
+ byte[] zipData = ((StampOptionsRequest) request).getZipData();
+
+ CloseableHttpClient client = HttpClients.createDefault();
+ HttpPost httppost = new HttpPost(request.URI);
+
+ MultipartEntityBuilder builder = MultipartEntityBuilder.create();
+ builder.setMode(HttpMultipartMode.BROWSER_COMPATIBLE);
+
+ builder.addBinaryBody("xml", zipData, ContentType.APPLICATION_OCTET_STREAM,
+ "zip");
+
+ httppost.addHeader("Authorization", "Bearer " + request.Token);
+
+ httppost.setEntity(builder.build());
+
+ try (CloseableHttpResponse responseB = client.execute(httppost)) {
+ String responseString = EntityUtils.toString(responseB.getEntity(), "UTF-8");
+ int status = responseB.getStatusLine().getStatusCode();
+
+ System.out.println(responseString);
+
+ ResponseStamp R = RespuestaTimbrado.Stamped(request.version.charAt(request.version.length() -
+ 1));
+ R.setReason(responseB.getStatusLine());
+ R.setResponse(responseString);
+ R.setStatus(status);
+
+ return R.getResponse();
+ }
+ } catch (IOException e) {
+ throw new GeneralException(500, e.getMessage());
+ }
+ }
}
\ No newline at end of file
diff --git a/src/main/java/Utils/Requests/Storage/StorageOptionsRequest.java b/src/main/java/Utils/Requests/Storage/StorageOptionsRequest.java
new file mode 100644
index 0000000..4c3b282
--- /dev/null
+++ b/src/main/java/Utils/Requests/Storage/StorageOptionsRequest.java
@@ -0,0 +1,18 @@
+package Utils.Requests.Storage;
+
+import java.util.UUID;
+import Utils.Constants;
+import Utils.Requests.IRequest;
+
+public class StorageOptionsRequest extends IRequest {
+ private UUID uuid;
+
+ public StorageOptionsRequest(String token, UUID uuid, String URIAPI, String proxyHost, int proxyPort) {
+ super(token, URIAPI + Constants.STORAGE_PATH, proxyHost, proxyPort);
+ this.uuid = uuid;
+ }
+
+ public UUID getUuid() {
+ return uuid;
+ }
+}
diff --git a/src/main/java/Utils/Requests/Storage/StorageRequest.java b/src/main/java/Utils/Requests/Storage/StorageRequest.java
new file mode 100644
index 0000000..88a9cec
--- /dev/null
+++ b/src/main/java/Utils/Requests/Storage/StorageRequest.java
@@ -0,0 +1,78 @@
+package Utils.Requests.Storage;
+
+import java.io.IOException;
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.util.EntityUtils;
+import org.json.JSONException;
+import org.json.JSONObject;
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.JsonSyntaxException;
+import Exceptions.AuthException;
+import Exceptions.GeneralException;
+import Utils.Helpers.RequestHelper;
+import Utils.Requests.IRequest;
+import Utils.Requests.IRequestor;
+import Utils.Responses.IResponse;
+import Utils.Responses.Storage.StorageData;
+import Utils.Responses.Storage.StorageResponse;
+
+public class StorageRequest implements IRequestor {
+ StorageData dataXml;
+
+ public IResponse sendRequest(IRequest request)
+ throws GeneralException, AuthException, GeneralException, IOException {
+ try {
+ CloseableHttpClient client = HttpClients.createDefault();
+ HttpGet httpget = new HttpGet(request.URI + ((StorageOptionsRequest) request).getUuid());
+ httpget.setHeader("Authorization", "bearer " + request.Token);
+ RequestHelper.setTimeOut(request.options, 3500);
+ RequestHelper.setProxy(request.options, request.proxyHost, request.proxyPort);
+ httpget.setConfig(request.options.build());
+ CloseableHttpResponse responseB = client.execute(httpget);
+ HttpEntity entity = responseB.getEntity();
+ String responseString = EntityUtils.toString(entity, "UTF-8");
+ int status = responseB.getStatusLine().getStatusCode();
+ client.close();
+ responseB.close();
+
+ if (!responseString.isEmpty() && status < 500) {
+ JSONObject body = new JSONObject(responseString);
+ if (status == 200) {
+ dataXml = deserialize(responseString, StorageData.class);
+ StorageResponse response = new StorageResponse(status, body.getString("status"), "OK", "OK",
+ dataXml);
+ if (response.getData() == null || response.getData().getData().getRecords().size() <= 0) {
+ response.setHttpStatusCode(400);
+ response.setStatus("error");
+ response.setMessage("Bad request.");
+ response.setMessageDetail("El UUID no ha sido encontrado");
+ }
+ return response;
+ } else {
+ StorageResponse response = new StorageResponse(status, body.getString("status"), "OK", "OK",
+ dataXml);
+ return new StorageResponse(status, "error", response.getMessage(), response.getMessageDetail());
+ }
+ } else {
+ return new StorageResponse(status, "error", responseB.getStatusLine().getReasonPhrase(),
+ responseString);
+ }
+ } catch (JSONException e) {
+ throw new GeneralException(500, e.getMessage());
+ }
+
+ }
+
+ public T deserialize(String json, Class contentClass) throws JsonSyntaxException, IOException {
+ if (json == null || json.isEmpty()) {
+ throw new IOException("No se obtuvo respuesta para el request hecho.");
+ }
+ Gson gson = new GsonBuilder().create();
+ return gson.fromJson(json, contentClass);
+ }
+}
diff --git a/src/main/java/Utils/Responses/IResponse.java b/src/main/java/Utils/Responses/IResponse.java
index 679eb21..b352444 100644
--- a/src/main/java/Utils/Responses/IResponse.java
+++ b/src/main/java/Utils/Responses/IResponse.java
@@ -1,21 +1,79 @@
package Utils.Responses;
public abstract class IResponse {
- public int HttpStatusCode ;
+ public int HttpStatusCode;
public String Status;
public String message = null;
public String messageDetail = null;
- //Status error
+ // Status error
public IResponse(int httpStatusCode, String status, String message, String messageDetail) {
HttpStatusCode = httpStatusCode;
Status = status;
this.message = message;
this.messageDetail = messageDetail;
}
- //Status success general
+
+ // Status success general
public IResponse(int httpStatusCode, String status) {
HttpStatusCode = httpStatusCode;
Status = status;
}
+
+ /**
+ * Obtiene el status de la solicitud.
+ * Solo puede ser "success" o "error".
+ * En caso de "success" puede consultar el campo "data".
+ * En caso de "error", consultar "getMessage" y "getMessageDetail".
+ *
+ * @return String
+ */
+ public String getStatus() {
+ return this.Status;
+ }
+
+ public void setStatus(String value) {
+ this.Status = value;
+ }
+
+ /**
+ * En caso de requerirlo se puede modificar el Codigo de respuesta Http..
+ *
+ * @return int
+ */
+ public void setHttpStatusCode(int value) {
+ this.HttpStatusCode = value;
+ }
+
+ /**
+ * Obtiene el mensaje de error obtenido.
+ * Nota: Este valor generalmente solo existe cunado la solicitud
+ * termino con status "error".
+ *
+ * @return String
+ */
+ public String getMessage() {
+ return this.message;
+ }
+
+ public void setMessage(String value) {
+ this.message = value;
+ }
+
+ /**
+ * Obtiene los detalles acerca del mensaje de error.
+ * Útil cuando el mensaje de error no es muy claro.
+ * Nota: Este valor generalmente solo existe cunado la solicitud
+ * termino con status "error".
+ * Nota: Puede ser null.
+ *
+ * @return String
+ */
+ public String getMessageDetail() {
+ return this.messageDetail;
+ }
+
+ public void setMessageDetail(String value) {
+ this.messageDetail = value;
+ }
}
diff --git a/src/main/java/Utils/Responses/Storage/StorageData.java b/src/main/java/Utils/Responses/Storage/StorageData.java
new file mode 100644
index 0000000..6f99dcb
--- /dev/null
+++ b/src/main/java/Utils/Responses/Storage/StorageData.java
@@ -0,0 +1,533 @@
+package Utils.Responses.Storage;
+
+import java.util.List;
+/*Estructura de los datos que se enviaran en el Storage response */
+
+public class StorageData {
+ public Data data;
+
+ public Data getData() {
+ return this.data;
+ }
+
+ public class Data {
+
+ public MetaData metaData;
+ public List records;
+ public String status;
+
+ public MetaData getMetaData() {
+ return this.metaData;
+ }
+
+ public List getRecords() {
+ return this.records;
+ }
+
+ public String getStatus() {
+ return this.status;
+ }
+ }
+
+ public class Records {
+ private String codigoCancelacion;
+ private String statusSAT;
+ private String urlPDF;
+ private String urlAckCfdi;
+ private String urlAckCancellation;
+ private boolean hasAddenda;
+ private String addenda;
+ private String urlAddenda;
+ private String fechaGeneracionPdf;
+ private String idDealer;
+ private String idUser;
+ private String version;
+ private String serie;
+ private String folio;
+ private String fecha;
+ private String numeroCertificado;
+ private Double subTotal;
+ private Double descuento;
+ private Double total;
+ private String moneda;
+ private Double tipoCambio;
+ private String tipoDeComprobante;
+ private String metodoPago;
+ private String formaPago;
+ private String condicionesPago;
+ private String luegarExpedicion;
+ private String emisorRfc;
+ private String emisorNombre;
+ private String regimenFiscal;
+ private String receptorRfc;
+ private String receptorNombre;
+ private String residenciaFiscal;
+ private String numRegIdTrib;
+ private String usoCFDI;
+ private Double totalImpuestosTraslados;
+ private Double totalImpuestosRetencion;
+ private Double trasladosIVA;
+ private Double trasladosIEPS;
+ private Double retencionesISR;
+ private Double retencionesIVA;
+ private Double retencionesIEPS;
+ private Double totalImpuestosLocalesTraslados;
+ private Double totalImpuestosLocalesRetencion;
+ private String complementos;
+ private String uuid;
+ private String fechaTimbrado;
+ private String rfcProvCertif;
+ private String selloCFD;
+ private String urlXml;
+ private String yearMonth;
+ private boolean status;
+
+ public String getCodigoCancelacion() {
+ return codigoCancelacion;
+ }
+
+ public void setCodigoCancelacion(String codigoCancelacion) {
+ this.codigoCancelacion = codigoCancelacion;
+ }
+
+ public String getStatusSAT() {
+ return statusSAT;
+ }
+
+ public void setStatusSAT(String statusSAT) {
+ this.statusSAT = statusSAT;
+ }
+
+ public String getUrlPDF() {
+ return urlPDF;
+ }
+
+ public void setUrlPDF(String urlPDF) {
+ this.urlPDF = urlPDF;
+ }
+
+ public String getUrlAckCfdi() {
+ return urlAckCfdi;
+ }
+
+ public void setUrlAckCfdi(String urlAckCfdi) {
+ this.urlAckCfdi = urlAckCfdi;
+ }
+
+ public String getUrlAckCancellation() {
+ return urlAckCancellation;
+ }
+
+ public void setUrlAckCancellation(String urlAckCancellation) {
+ this.urlAckCancellation = urlAckCancellation;
+ }
+
+ public boolean isHasAddenda() {
+ return hasAddenda;
+ }
+
+ public void setHasAddenda(boolean hasAddenda) {
+ this.hasAddenda = hasAddenda;
+ }
+
+ public String getAddenda() {
+ return addenda;
+ }
+
+ public void setAddenda(String addenda) {
+ this.addenda = addenda;
+ }
+
+ public String getUrlAddenda() {
+ return urlAddenda;
+ }
+
+ public void setUrlAddenda(String urlAddenda) {
+ this.urlAddenda = urlAddenda;
+ }
+
+ public String getFechaGeneracionPdf() {
+ return fechaGeneracionPdf;
+ }
+
+ public void setFechaGeneracionPdf(String fechaGeneracionPdf) {
+ this.fechaGeneracionPdf = fechaGeneracionPdf;
+ }
+
+ public String getIdDealer() {
+ return idDealer;
+ }
+
+ public void setIdDealer(String idDealer) {
+ this.idDealer = idDealer;
+ }
+
+ public String getIdUser() {
+ return idUser;
+ }
+
+ public void setIdUser(String idUser) {
+ this.idUser = idUser;
+ }
+
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public String getSerie() {
+ return serie;
+ }
+
+ public void setSerie(String serie) {
+ this.serie = serie;
+ }
+
+ public String getFolio() {
+ return folio;
+ }
+
+ public void setFolio(String folio) {
+ this.folio = folio;
+ }
+
+ public String getFecha() {
+ return fecha;
+ }
+
+ public void setFecha(String fecha) {
+ this.fecha = fecha;
+ }
+
+ public String getNumeroCertificado() {
+ return numeroCertificado;
+ }
+
+ public void setNumeroCertificado(String numeroCertificado) {
+ this.numeroCertificado = numeroCertificado;
+ }
+
+ public Double getSubTotal() {
+ return subTotal;
+ }
+
+ public void setSubTotal(Double subTotal) {
+ this.subTotal = subTotal;
+ }
+
+ public Double getDescuento() {
+ return descuento;
+ }
+
+ public void setDescuento(Double descuento) {
+ this.descuento = descuento;
+ }
+
+ public Double getTotal() {
+ return total;
+ }
+
+ public void setTotal(Double total) {
+ this.total = total;
+ }
+
+ public String getMoneda() {
+ return moneda;
+ }
+
+ public void setMoneda(String moneda) {
+ this.moneda = moneda;
+ }
+
+ public Double getTipoCambio() {
+ return tipoCambio;
+ }
+
+ public void setTipoCambio(Double tipoCambio) {
+ this.tipoCambio = tipoCambio;
+ }
+
+ public String getTipoDeComprobante() {
+ return tipoDeComprobante;
+ }
+
+ public void setTipoDeComprobante(String tipoDeComprobante) {
+ this.tipoDeComprobante = tipoDeComprobante;
+ }
+
+ public String getMetodoPago() {
+ return metodoPago;
+ }
+
+ public void setMetodoPago(String metodoPago) {
+ this.metodoPago = metodoPago;
+ }
+
+ public String getFormaPago() {
+ return formaPago;
+ }
+
+ public void setFormaPago(String formaPago) {
+ this.formaPago = formaPago;
+ }
+
+ public String getCondicionesPago() {
+ return condicionesPago;
+ }
+
+ public void setCondicionesPago(String condicionesPago) {
+ this.condicionesPago = condicionesPago;
+ }
+
+ public String getLuegarExpedicion() {
+ return luegarExpedicion;
+ }
+
+ public void setLuegarExpedicion(String luegarExpedicion) {
+ this.luegarExpedicion = luegarExpedicion;
+ }
+
+ public String getEmisorRfc() {
+ return emisorRfc;
+ }
+
+ public void setEmisorRfc(String emisorRfc) {
+ this.emisorRfc = emisorRfc;
+ }
+
+ public String getEmisorNombre() {
+ return emisorNombre;
+ }
+
+ public void setEmisorNombre(String emisorNombre) {
+ this.emisorNombre = emisorNombre;
+ }
+
+ public String getRegimenFiscal() {
+ return regimenFiscal;
+ }
+
+ public void setRegimenFiscal(String regimenFiscal) {
+ this.regimenFiscal = regimenFiscal;
+ }
+
+ public String getReceptorRfc() {
+ return receptorRfc;
+ }
+
+ public void setReceptorRfc(String receptorRfc) {
+ this.receptorRfc = receptorRfc;
+ }
+
+ public String getReceptorNombre() {
+ return receptorNombre;
+ }
+
+ public void setReceptorNombre(String receptorNombre) {
+ this.receptorNombre = receptorNombre;
+ }
+
+ public String getResidenciaFiscal() {
+ return residenciaFiscal;
+ }
+
+ public void setResidenciaFiscal(String residenciaFiscal) {
+ this.residenciaFiscal = residenciaFiscal;
+ }
+
+ public String getNumRegIdTrib() {
+ return numRegIdTrib;
+ }
+
+ public void setNumRegIdTrib(String numRegIdTrib) {
+ this.numRegIdTrib = numRegIdTrib;
+ }
+
+ public String getUsoCFDI() {
+ return usoCFDI;
+ }
+
+ public void setUsoCFDI(String usoCFDI) {
+ this.usoCFDI = usoCFDI;
+ }
+
+ public Double getTotalImpuestosTraslados() {
+ return totalImpuestosTraslados;
+ }
+
+ public void setTotalImpuestosTraslados(Double totalImpuestosTraslados) {
+ this.totalImpuestosTraslados = totalImpuestosTraslados;
+ }
+
+ public Double getTotalImpuestosRetencion() {
+ return totalImpuestosRetencion;
+ }
+
+ public void setTotalImpuestosRetencion(Double totalImpuestosRetencion) {
+ this.totalImpuestosRetencion = totalImpuestosRetencion;
+ }
+
+ public Double getTrasladosIVA() {
+ return trasladosIVA;
+ }
+
+ public void setTrasladosIVA(Double trasladosIVA) {
+ this.trasladosIVA = trasladosIVA;
+ }
+
+ public Double getTrasladosIEPS() {
+ return trasladosIEPS;
+ }
+
+ public void setTrasladosIEPS(Double trasladosIEPS) {
+ this.trasladosIEPS = trasladosIEPS;
+ }
+
+ public Double getRetencionesISR() {
+ return retencionesISR;
+ }
+
+ public void setRetencionesISR(Double retencionesISR) {
+ this.retencionesISR = retencionesISR;
+ }
+
+ public Double getRetencionesIVA() {
+ return retencionesIVA;
+ }
+
+ public void setRetencionesIVA(Double retencionesIVA) {
+ this.retencionesIVA = retencionesIVA;
+ }
+
+ public Double getRetencionesIEPS() {
+ return retencionesIEPS;
+ }
+
+ public void setRetencionesIEPS(Double retencionesIEPS) {
+ this.retencionesIEPS = retencionesIEPS;
+ }
+
+ public Double getTotalImpuestosLocalesTraslados() {
+ return totalImpuestosLocalesTraslados;
+ }
+
+ public void setTotalImpuestosLocalesTraslados(Double totalImpuestosLocalesTraslados) {
+ this.totalImpuestosLocalesTraslados = totalImpuestosLocalesTraslados;
+ }
+
+ public Double getTotalImpuestosLocalesRetencion() {
+ return totalImpuestosLocalesRetencion;
+ }
+
+ public void setTotalImpuestosLocalesRetencion(Double totalImpuestosLocalesRetencion) {
+ this.totalImpuestosLocalesRetencion = totalImpuestosLocalesRetencion;
+ }
+
+ public String getComplementos() {
+ return complementos;
+ }
+
+ public void setComplementos(String complementos) {
+ this.complementos = complementos;
+ }
+
+ public String getUuid() {
+ return uuid;
+ }
+
+ public void setUuid(String uuid) {
+ this.uuid = uuid;
+ }
+
+ public String getFechaTimbrado() {
+ return fechaTimbrado;
+ }
+
+ public void setFechaTimbrado(String fechaTimbrado) {
+ this.fechaTimbrado = fechaTimbrado;
+ }
+
+ public String getRfcProvCertif() {
+ return rfcProvCertif;
+ }
+
+ public void setRfcProvCertif(String rfcProvCertif) {
+ this.rfcProvCertif = rfcProvCertif;
+ }
+
+ public String getSelloCFD() {
+ return selloCFD;
+ }
+
+ public void setSelloCFD(String selloCFD) {
+ this.selloCFD = selloCFD;
+ }
+
+ public String getUrlXml() {
+ return urlXml;
+ }
+
+ public void setUrlXml(String urlXml) {
+ this.urlXml = urlXml;
+ }
+
+ public String getYearMonth() {
+ return yearMonth;
+ }
+
+ public void setYearMonth(String yearMonth) {
+ this.yearMonth = yearMonth;
+ }
+
+ public boolean isStatus() {
+ return status;
+ }
+
+ public void setStatus(boolean status) {
+ this.status = status;
+ }
+
+ }
+
+ public class MetaData {
+
+ public String page;
+ public String perPage;
+ public String pageCount;
+ public String totalCount;
+ public Links links;
+
+ public String getPage() {
+ return this.page;
+ }
+
+ public String getPerPage() {
+ return this.perPage;
+ }
+
+ public String getPageCount() {
+ return this.pageCount;
+ }
+
+ public String getTotalCount() {
+ return this.totalCount;
+ }
+
+ public Links getLinks() {
+ return this.links;
+ }
+ }
+
+ public class Links {
+
+ public String current;
+
+ public String getCurrent() {
+ return this.current;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/src/main/java/Utils/Responses/Storage/StorageResponse.java b/src/main/java/Utils/Responses/Storage/StorageResponse.java
new file mode 100644
index 0000000..89c8bbc
--- /dev/null
+++ b/src/main/java/Utils/Responses/Storage/StorageResponse.java
@@ -0,0 +1,33 @@
+package Utils.Responses.Storage;
+
+import Utils.Responses.IResponse;
+
+public class StorageResponse extends IResponse {
+
+ private StorageData dataXml;
+
+ /**
+ * Constructor de la clase.
+ *
+ * @param httpStatusCode codigo de respuesta.
+ * @param status status de llamada a API.
+ * @param msg mensaje devuelto por API.
+ * @param msgDetail detalles mensaje de la API.
+ * @param dataXml datos del xml
+ */
+ public StorageResponse(int httpStatusCode, String status, String msg, String msgDetail,
+ StorageData dataXml) {
+ super(httpStatusCode, status, msg, msgDetail);
+ this.dataXml = dataXml;
+
+ }
+
+ public StorageResponse(int httpStatusCode, String status, String msg, String msgDetail) {
+ super(httpStatusCode, status, msg, msgDetail);
+ }
+
+ // Metodo para acceder a los datos de la respuesta
+ public StorageData getData() {
+ return this.dataXml;
+ }
+}
\ No newline at end of file
diff --git a/src/test/java/Tests/AcceptReject/SWAcceptRejectServiceTest.java b/src/test/java/Tests/AcceptReject/SWAcceptRejectServiceTest.java
index 4cbb277..a06053d 100644
--- a/src/test/java/Tests/AcceptReject/SWAcceptRejectServiceTest.java
+++ b/src/test/java/Tests/AcceptReject/SWAcceptRejectServiceTest.java
@@ -12,22 +12,14 @@
import Utils.Responses.AcceptReject.CancelationData;
public class SWAcceptRejectServiceTest {
- public String uuid = "06a46e4b-b154-4c12-bb77-f9a63ed55ff2";
- public String password_csd = "12345678a";
- public String rfc = "LAN7008173R5";
- public String b64Cer = "MIIFxTCCA62gAwIBAgIUMjAwMDEwMDAwMDAzMDAwMjI4MTUwDQYJKoZIhvcNAQELBQAwggFmMSAwHgYDVQQDDBdBLkMuIDIgZGUgcHJ1ZWJhcyg0MDk2KTEvMC0GA1UECgwmU2VydmljaW8gZGUgQWRtaW5pc3RyYWNpw7NuIFRyaWJ1dGFyaWExODA2BgNVBAsML0FkbWluaX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Xpdy/b+Aro5n87w+0MHRcllF8ZKbtQ/ym4oG7aREuo7o71JXJQPjZKTOtVM1EQx/FLM/5brnDSoyvLtoYtv9/tTnIC+8gR6eErkzaGmn8pftPhGNuz6yzx8JeLFoMD7VWbGTefj46KS+yMweFJnpReHEqwnukXpEYq19EWVyQa/Sb7navtKt80y/vRs0aNZp3iL23AOs0u1kQ1CFNY2y12Gor1koaH2FUd5jAQnaSKmgarLy0H/QVvR2g8B3+Fh49QhKYrd8N6LvvI80cwbEoqYWn5DWA=";
- public String xml = "3eaeabc9-ea41-4627-9609-c6856b78e2b1rs2ZcFnS9hbfmyJLmR3Mtnklt7g=O/I7ILsU2y1fqeb2NBZSQKlQC3DpN/bgcDB5LWCMIYp4mFCLmLxEq/6ADz0xVQWUw49BqWDZ1GAI4ODIZLDQtafHSIE7BXKy8huvKD1dtpRLQ/39IfpxXsz1g6Q14mH3LxDOQugk/GhKMWILXZnIipyQosv3IbgLMZ/V/4btK7xrFX/KiOt0PcefChyaerj9A815dA3J4JgpBUNzbOz9VlhvdZMJskrHxzZ5riU1TAuSw/oi68dJfA7S+6XrTmeFDQzYxACHyOzj24RjLi/31+Fc/wiqQXNu9O6oWl8p5+GVoz2xtU4aRqLxVh73L6WAAef/WDeKDMfIge1BtMrxYw==OID.1.2.840.113549.1.9.2=Responsable: ACDMA, OID.2.5.4.45=SAT970701NN3, L=Coyoac?n, S=Distrito Federal, C=MX, PostalCode=06300, STREET=\"Av. Hidalgo 77, Col. Guerrero\", E=asisnet@pruebas.sat.gob.mx, OU=Administraci?n de Seguridad de la Informaci?n, O=Servicio de Administraci?n Tributaria, CN=A.C. 2 de pruebas(4096)3230303031303030303030333030303232383135MIIFxTCCA62gAwIBAgIUMjAwMDEwMDAwMDAzMDAwMjI4MTUwDQYJKoZIhvcNAQELBQAwggFmMSAwHgYDVQQDDBdBLkMuIDIgZGUgcHJ1ZWJhcyg0MDk2KTEvMC0GA1UECgwmU2VydmljaW8gZGUgQWRtaW5pc3RyY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ae74mdA+AN07lQC7Q8FicpTDlNjqh+VV5nqLht8wzzq/l1QFgcjxgp23520G/YpCGhseJv2PWcV0H1rs0coAi3qCr7G+A2MYwGJA4DCAfD92xZWtZgPUpPSELvEBgWqMsW87xd1MSkumJ8e7zGOMXoFRo3ID4wot1FIaWU/EJyzb3xowrbY64Ytquuu9s9ef0weTumPMvkWcnGeqgKaEMnl24Is6CoG+qS+HfvgS8qxiv1TfTTIRmT0nhYWRoEkE/0ue6X4Zs+qT28Z8P/LzcIJECJvd39K5BI0q3RMqEVumgVcKGPB9nkxReDPR1M/cxY9qru99NaOK0dZJAin5AXDVOrCZzOdLeEU5lIRXWZwr9i1/rVvLh6f3tnhVWgbghp+JsuhaX2ALRY74pAosbzVMZJlf31TElMCMGCSqGSIb3DQEJFTEWBBTV2Mqe5ylxDwy8SvKAi/DPPo81QzAxMCEwCQYFKw4DAhoFAAQUro+9ySRmBaYPd9oC4rXFvP20CPkECEuQk0rStkWzAgIIAA==";
-
- @Ignore
+@Ignore
public void testAcceptrejectCancelationService_CSD() throws Exception {
SWAcceptRejectService app = new SWAcceptRejectService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
Map uuids = new HashMap();
uuids.put("06a46e4b-b154-4c12-bb77-f9a63ed55ff2", "Aceptacion");
AceptarRechazarCancelationResponse response = null;
- response = (AceptarRechazarCancelationResponse) app.AceptarRechazarCancelacionCSD(uuids, password_csd, rfc,
- b64Cer, b64Key);
+ response = (AceptarRechazarCancelationResponse) app.AceptarRechazarCancelacionCSD(uuids, Utils.passwordCsd, Utils.rfc,
+ Utils.cerb64, Utils.keyb64);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
LinkedList folios = (LinkedList) response.folios;
@@ -49,9 +41,8 @@ public void testAcceptrejectCancelationService_CSD() throws Exception {
@Ignore
public void testAcceptrejectCancelationService_XML() throws Exception {
SWAcceptRejectService app = new SWAcceptRejectService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
- String xml = " 06a46e4b-b154-4c12-bb77-f9a63ed55ff2 Aceptacion AQ36cbqKJKHy5vaS6GhDTWtwKE4= HVlFUPmRLyxeztem827eaasDObRXi+oqedCNNvDyMsRizqsS99cHt5mJCEE4vWgpDGPGLrph/yd++R4aN+V562DPp9qreFkisFpEvJy5Z8o/KzG7vc5qqaD8z9ohPpRERPHvxFrIm3ryEBqnSV6zqJG02PuxkWvYonVc+B7RdsO5iAiDTMs9guUhOvHBK8BVXQHKCbUAPCp/4YepZ4LUkcdloCAMPsN0x9GaUty2RMtNJuwaRWy+5IIBUCeXXZmQhoQfS0QfPpCByt0ago5v+FocJQiYQrsUV/8mesmNw5JoOCmufQYliQFyZgsstV8+h76dU/rwLr6R8YlFOkTxKg== OID.1.2.840.113549.1.9.2=Responsable: ACDMA, OID.2.5.4.45=SAT970701NN3, L=Coyoacán, S=Distrito Federal, C=MX, PostalCode=06300, STREET=\"Av. Hidalgo 77, Col. Guerrero\", E=asisnet@pruebas.sat.gob.mx, OU=Administración de Seguridad de la Información, O=Servicio de Administración Tributaria, CN=A.C. 2 de pruebas(4096) 3230303031303030303030333030303232383135 MIIFxTCCA62gAwIBAgIUMjAwMDEwMDAwMDAzMDAwMjI4MTUwDQYJKoZIhvcNAQELBQAwggFmMSAwHgYDVQQDDBdBLkMuIDIgZGUgcHJ1ZWJhcyg0MDk2KTEvMC0GA1UECgwmU2VydmljaW8gZGUgQWRtaW5pc3RyYWNpw7NuIFRyaWJ1dGFyaWExODA2BgNVBAsML0FkbWluaXN0cmFjacOzbiBkZSBTZWd1cmlkYWQgZGUgbGEgSW5mb3JtYWNpw7NuMSkwJwYJKoZIhvcNAQkBFhphc2lzbmV0QHBydWViYXMuc2F0LmdvYi5teDEmMCQGA1UECQwdQXYuIEhpZGFsZ28gNzcsIENvbC4gR3VlcnJlcm8xDjAMBgNVBBEMBTA2MzAwMQswCQYDVQQGEwJNWDEZMBcGA1UECAwQRGlzdHJpdG8gRmVkZXJhbDESMBAGA1UEBwwJQ295b2Fjw6FuMRU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iO5M8AEISAV7eZidIl3iaJJHkQbBYiiW2gikreUZKPUX0HmlnIqqQcBJhWKRu6Nqk6aZBTETLLpGrvF9OArV1JSsbdw/ZH+P88RAt5em5/gjwwtFlNHyiKG5w+UFpaZOK3gZP0su0sa6dlPeQ9EL4JlFkGqQCgSQ+NOsXqaOavgoP5VLykLwuGnwIUnuhBTVeDbzpgrg9LuF5dYp/zs+Y9ScJqe5VMAagLSYTShNtN8luV7LvxF9pgWwZdcM7lUwqJmUddCiZqdngg3vzTactMToG16gZA4CWnMgbU4E+r541+FNMpgAZNvs2CiW/eApfaaQojsZEAHDsDv4L5n3M1CC7fYjE/d61aSng1LaO6T1mh+dEfPvLzp7zyzz+UgWMhi5Cs4pcXx1eic5r7uxPoBwcCTt3YI1jKVVnV7/w= ";
AceptarRechazarCancelationResponse response = null;
- response = (AceptarRechazarCancelationResponse) app.AceptarRechazarCancelacionXML(xml);
+ response = (AceptarRechazarCancelationResponse) app.AceptarRechazarCancelacionXML(Utils.aceptacionRechazoXml);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
List folios = response.folios;
@@ -76,7 +67,7 @@ public void testAcceptrejectCancelationService_PFX() throws Exception {
Map uuids = new HashMap();
uuids.put("06a46e4b-b154-4c12-bb77-f9a63ed55ff2", "Aceptacion");
AceptarRechazarCancelationResponse response = null;
- response = (AceptarRechazarCancelationResponse) app.AceptarRechazarCancelacionPFX(uuids, password_csd, rfc, b64Pfx);
+ response = (AceptarRechazarCancelationResponse) app.AceptarRechazarCancelacionPFX(uuids, Utils.passwordPfx, Utils.rfc, Utils.pfxb64);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
LinkedList folios = (LinkedList) response.folios;
@@ -100,7 +91,7 @@ public void testAcceptrejectCancelationService_UUID() throws Exception {
SWAcceptRejectService app = new SWAcceptRejectService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
String uuidC = "06a46e4b-b154-4c12-bb77-f9a63ed55ff2";
AceptarRechazarCancelationResponse response = null;
- response = (AceptarRechazarCancelationResponse) app.AceptarRechazarCancelacionUUID(uuidC, rfc, "Aceptacion");
+ response = (AceptarRechazarCancelationResponse) app.AceptarRechazarCancelacionUUID(uuidC, Utils.rfc, "Aceptacion");
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
LinkedList folios = (LinkedList) response.folios;
diff --git a/src/test/java/Tests/Cancelation/SWCancelationServiceTest.java b/src/test/java/Tests/Cancelation/SWCancelationServiceTest.java
index a5f6e92..b2ff8d9 100644
--- a/src/test/java/Tests/Cancelation/SWCancelationServiceTest.java
+++ b/src/test/java/Tests/Cancelation/SWCancelationServiceTest.java
@@ -8,22 +8,13 @@
import org.junit.Test;
public class SWCancelationServiceTest {
-
- public String uuid = "fe4e71b0-8959-4fb9-8091-f5ac4fb0fef8";
- public String password_csd = "12345678a";
- public String rfc = "EKU9003173C9";
- public String b64Cer = "MIIFsDCCA5igAwIBAgIUMzAwMDEwMDAwMDA1MDAwMDM0MTYwDQYJKoZIhvcNAQELBQAwggErMQ8wDQYDVQQDDAZBQyBVQVQxLjAsBgNVBAoMJVNFUlZJQ0lPIERFIEFETUlOSVNUUkFDSU9OIFRSSUJVVEFSSUExGjAYBgNVBAsMEVNBVC1JRVMgQXV0aG9yaXR5MSgwJgYJKoZIhvcNAQkBFhlvc2Nhci5tYXJ0aW5lekBzYXQuZ29iLm14MR0wGwYDVQQJDBQzcmEgY2VycmFkYSBkZSBjYWxpejEOMAwGA1UEEQwFMDYzNzAxCzAJBgNVBAYTAk1YMRkwFwYDVQQIDBBDSVVEQUQgREUgTUVYSUNPMREwDwYDVQQHDAhDT1lPQUNBTjERMA8GA1UELRMIMi41LjQuNDUxJTAjBgkqhkiG9w0BCQITFnJlc3BvbnNhYmxlOiBBQ0RNQS1TQVQwHhcNMjMwNTE4MTE0MzUxWhcNMjcwNTE4MTE0MzUxWjCB1zEnMCUGA1UEAxMeRVNDVUVMQSBLRU1QRVIgVVJHQVRFIFNBIERFIENWMScwJQYDVQQpEx5FU0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ZdDFMh2y6kwwN0Hh3/+wfNysnTFzkxNP+U+5KVgJtMkDs2knByylY+Sr16Nev1nWhaxJW8Z9pwAQ4Tly2Xc6a8C4uVcc7ZwpXp9eIPKpHBEK93wpUZjdK4PHCUElI8GkQ1Sq4Visyyx4HyBfB4vGP6u/7EgsVFWr7Ub6nyu1rvFyRMa5VhatOyVce9efRT0SnLHB7iWZH4EPbzqyx4tZuS641uKF4xtgwvfybNzpCQsKDi5hlNX9NtHHv61YdwmO2+VJ1+gn9Vf0sddEvj9o9F92zlFq5w==OID.1.2.840.113549.1.9.2=responsable: ACDMA-SAT, OID.2.5.4.45=2.5.4.45, L=COYOACAN, S=CIUDAD DE MEXICO, C=MX, PostalCode=06370, STREET=3ra cerrada de caliz, E=oscar.martinez@sat.gob.mx, OU=SAT-IES Authority, O=SERVICIO DE ADMINISTRACION TRIBUTARIA, CN=AC UAT292233162870206001759766198462772978647764840758MIIFsDCCA5igAwIBAgIUMzAwMDEwMDAwMDA1MDAwMDM0MTYwDQYJKoZIhvcNAQELBQAwggErMQ8wDQYDVQQDDAZBQyBVQVQxLjAsBgNVBAoMJVNFUlZJQ0lPIERFIEFETUlOSVNUUkFDSU9OIFRSSUJVVEFSSUExGjAYBgNVBAsMEVNBVC1JRVMgQXV0aG9yaXR5MSgwJgYJKoZIhvcNAQkBFhlvc2Nhci5tYXJ0aW5lekBzYXQuZ29iLm14MR0wGwYDVQQJDBQzcmEgY2VycmFkYSBkZSBjYWxpejEOMAwGA1UEEQwFMDYzNzAxCzAJBgNVBAYTAk1YMRkwFwYDVQQIDBBDSVVEQUQgREUgTUVYSUNPMREwDwYDVQQHDAhDT1lPQUNBTjERMA8GA1UELRMIMi41LjQuNDUxJTAjBgkqhkiG9w0BCQITFnJlc3BvbnNhYmxlOiBBQ0RNQS1TQVQwHhcNMjMwNTE4MTE0MzUxWhcNMjcwNTE4MTE0MzUxWjCB1zEnMCUGA1UEAxMeRVNDVUVMQSBLRU1QRVIgVVJHQVRFIFNBI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EbueyvouDEolWquT4X+TAxMCEwCQYFKw4DAhoFAAQUOrUnTXGC+I2VX4ewjZ/Ts7rZKXAECO6kkoaRSORDAgIIAA==";
- public String motivo="01";
- public String foliosustitucion="0e4c30b8-11d8-40d8-894d-ef8b32eb4bdf";
- //csd
+ // csd
@Test
public void testCancelationServiceCSD_authUser() throws Exception {
- SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
+ SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
CancelationResponse response = null;
- response = (CancelationResponse) app.Cancelation(uuid, password_csd, rfc, b64Cer, b64Key, motivo, foliosustitucion);
+ response = (CancelationResponse) app.Cancelation(Utils.uuid, Utils.passwordCsd, Utils.rfc, Utils.cerb64, Utils.keyb64, "01",
+ Utils.foliosustitucion);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.acuse);
@@ -32,11 +23,13 @@ public void testCancelationServiceCSD_authUser() throws Exception {
String expect_status = "success";
Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
}
+
@Test
public void testCancelationServiceCSD_authToken() throws Exception {
SWCancelationService app = new SWCancelationService(Utils.tokenSW, Utils.urlSW);
CancelationResponse response = null;
- response = (CancelationResponse) app.Cancelation(uuid, password_csd, rfc, b64Cer, b64Key, motivo, foliosustitucion);
+ response = (CancelationResponse) app.Cancelation(Utils.uuid, Utils.passwordCsd, Utils.rfc, Utils.cerb64, Utils.keyb64, "01",
+ Utils.foliosustitucion);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.acuse);
@@ -45,11 +38,42 @@ public void testCancelationServiceCSD_authToken() throws Exception {
String expect_status = "success";
Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
}
+
+ @Test
+ public void testCancelationServiceCSD_FolioSustitionNull() throws Exception {
+ SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
+ CancelationResponse response = null;
+ response = (CancelationResponse) app.Cancelation(Utils.uuid, Utils.passwordCsd, Utils.rfc, Utils.cerb64, Utils.keyb64, "02", null);
+ System.out.println(response.Status);
+ System.out.println(response.HttpStatusCode);
+ System.out.println(response.acuse);
+ System.out.println(response.uuid);
+ System.out.println(response.uuidStatusCode);
+ System.out.println(response.messageDetail);
+ String expect_status = "success";
+ Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
+ }
+
+ @Test
+ public void testCancelationServiceCsd_FolioSustitionStringEmpty() throws Exception {
+ SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
+ CancelationResponse response = null;
+ response = (CancelationResponse) app.Cancelation(Utils.uuid, Utils.passwordCsd, Utils.rfc, Utils.cerb64, Utils.keyb64, "02", "");
+ System.out.println(response.Status);
+ System.out.println(response.HttpStatusCode);
+ System.out.println(response.acuse);
+ System.out.println(response.uuid);
+ System.out.println(response.uuidStatusCode);
+ String expect_status = "success";
+ Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
+ }
+
@Test
public void testCancelationServiceCSD_incorrectParams() throws Exception {
SWCancelationService app = new SWCancelationService(Utils.tokenSW, Utils.urlSW);
CancelationResponse response = null;
- response = (CancelationResponse) app.Cancelation("123456", "123456", "123456", "123456", "123456", "123456","123456");
+ response = (CancelationResponse) app.Cancelation("123456", "123456", "123456", "123456", "123456", "123456",
+ "123456");
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.message);
@@ -57,23 +81,27 @@ public void testCancelationServiceCSD_incorrectParams() throws Exception {
String expect_status = "error";
Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
}
+
@Test
public void testCancelationServiceCSD_incorrectToken() throws Exception {
SWCancelationService app = new SWCancelationService("wrong token", Utils.urlSW);
CancelationResponse response = null;
- response = (CancelationResponse) app.Cancelation(uuid, password_csd, rfc, b64Cer, b64Key, motivo, foliosustitucion);
+ response = (CancelationResponse) app.Cancelation(Utils.uuid, Utils.passwordCsd, Utils.rfc, Utils.cerb64, Utils.keyb64, "01",
+ Utils.foliosustitucion);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.message);
System.out.println(response.messageDetail);
Assert.assertTrue(response.HttpStatusCode == 401);
}
+
@Test
public void testCancelationServiceCSD_emptyUserParams() throws Exception {
try {
SWCancelationService app = new SWCancelationService("", "", "");
CancelationResponse response = null;
- response = (CancelationResponse) app.Cancelation(uuid, password_csd, rfc, b64Cer, b64Key, motivo, foliosustitucion);
+ response = (CancelationResponse) app.Cancelation(Utils.uuid, Utils.passwordCsd, Utils.rfc, Utils.cerb64, Utils.keyb64, "01",
+ Utils.foliosustitucion);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.message);
@@ -84,9 +112,10 @@ public void testCancelationServiceCSD_emptyUserParams() throws Exception {
Assert.assertNotNull("Something bad happened", e);
}
}
+
@Test
public void testCancelationServiceCSD_emptyCancelationParams() throws Exception {
- SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
+ SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
CancelationResponse response = null;
response = (CancelationResponse) app.Cancelation("", "", "", "", "", "", "");
System.out.println(response.Status);
@@ -98,12 +127,12 @@ public void testCancelationServiceCSD_emptyCancelationParams() throws Exception
Assert.assertTrue(expected_HttpStatusCode == response.HttpStatusCode);
}
- //XML
+ // XML
@Test
public void testCancelationServiceXML_validXML() throws Exception {
- SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
+ SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
CancelationResponse response = null;
- response = (CancelationResponse) app.Cancelation(xml);
+ response = (CancelationResponse) app.Cancelation(Utils.cancelacionXml);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.message);
@@ -114,9 +143,10 @@ public void testCancelationServiceXML_validXML() throws Exception {
String expect_status = "success";
Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
}
+
@Test
public void testCancelationServiceXML_invalidXML() throws Exception {
- SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
+ SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
CancelationResponse response = null;
response = (CancelationResponse) app.Cancelation("wrong xml");
System.out.println(response.Status);
@@ -127,6 +157,7 @@ public void testCancelationServiceXML_invalidXML() throws Exception {
Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
Assert.assertTrue(response.message.contains("CASD - Acuse"));
}
+
@Test
public void testCancelationServiceXML_nullXML() throws Exception {
SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
@@ -146,7 +177,7 @@ public void testCancelationServiceXML_nullXML() throws Exception {
public void testCancelationServicePfx_authUser() throws Exception {
SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
CancelationResponse response = null;
- response = (CancelationResponse) app.Cancelation(uuid, password_csd, rfc, b64Pfx,motivo, foliosustitucion);
+ response = (CancelationResponse) app.Cancelation(Utils.uuid, Utils.passwordPfx, Utils.rfc, Utils.pfxb64, "01", Utils.foliosustitucion);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.acuse);
@@ -155,11 +186,41 @@ public void testCancelationServicePfx_authUser() throws Exception {
String expect_status = "success";
Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
}
+
@Test
public void testCancelationServicePfx_authToken() throws Exception {
SWCancelationService app = new SWCancelationService(Utils.tokenSW, Utils.urlSW);
CancelationResponse response = null;
- response = (CancelationResponse) app.Cancelation(uuid, password_csd, rfc, b64Pfx, motivo, foliosustitucion);
+ response = (CancelationResponse) app.Cancelation(Utils.uuid, Utils.passwordPfx, Utils.rfc, Utils.pfxb64, "01", Utils.foliosustitucion);
+ System.out.println(response.Status);
+ System.out.println(response.HttpStatusCode);
+ System.out.println(response.acuse);
+ System.out.println(response.uuid);
+ System.out.println(response.uuidStatusCode);
+ String expect_status = "success";
+ Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
+ }
+
+ @Test
+ public void testCancelationServicePfx_FolioSustitionNull() throws Exception {
+ SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
+ CancelationResponse response = null;
+ response = (CancelationResponse) app.Cancelation(Utils.uuid, Utils.passwordPfx, Utils.rfc, Utils.pfxb64, "02", null);
+ System.out.println(response.Status);
+ System.out.println(response.HttpStatusCode);
+ System.out.println(response.acuse);
+ System.out.println(response.uuid);
+ System.out.println(response.uuidStatusCode);
+ System.out.println(response.messageDetail);
+ String expect_status = "success";
+ Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
+ }
+
+ @Test
+ public void testCancelationServicePfx_FolioSustitionStringEmpty() throws Exception {
+ SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
+ CancelationResponse response = null;
+ response = (CancelationResponse) app.Cancelation(Utils.uuid, Utils.passwordPfx, Utils.rfc, Utils.pfxb64, "02", "");
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.acuse);
@@ -168,11 +229,12 @@ public void testCancelationServicePfx_authToken() throws Exception {
String expect_status = "success";
Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
}
+
@Test
public void testCancelationServicePfx_incorrectParams() throws Exception {
SWCancelationService app = new SWCancelationService(Utils.tokenSW, Utils.urlSW);
CancelationResponse response = null;
- response = (CancelationResponse) app.Cancelation("123456", "123456", "123456", "123456","123456","123456");
+ response = (CancelationResponse) app.Cancelation("123456", "123456", "123456", "123456", "123456", "123456");
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.message);
@@ -180,23 +242,25 @@ public void testCancelationServicePfx_incorrectParams() throws Exception {
String expect_status = "error";
Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
}
+
@Test
public void testCancelationServicePfx_incorrectToken() throws Exception {
SWCancelationService app = new SWCancelationService("wrong token", Utils.urlSW);
CancelationResponse response = null;
- response = (CancelationResponse) app.Cancelation(uuid, password_csd, rfc, b64Pfx, motivo, foliosustitucion);
+ response = (CancelationResponse) app.Cancelation(Utils.uuid, Utils.passwordPfx, Utils.rfc, Utils.pfxb64, "01", Utils.foliosustitucion);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.message);
System.out.println(response.messageDetail);
Assert.assertTrue(response.HttpStatusCode == 401);
}
+
@Test
public void testCancelationServicePfx_emptyUserParams() throws Exception {
try {
SWCancelationService app = new SWCancelationService("", "", "");
CancelationResponse response = null;
- response = (CancelationResponse) app.Cancelation(uuid, password_csd, rfc, b64Pfx, motivo, foliosustitucion);
+ response = (CancelationResponse) app.Cancelation(Utils.uuid, Utils.passwordPfx, Utils.rfc, Utils.pfxb64, "01",Utils.foliosustitucion);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.message);
@@ -207,6 +271,7 @@ public void testCancelationServicePfx_emptyUserParams() throws Exception {
Assert.assertNotNull("Something bad happened", e);
}
}
+
@Test
public void testCancelationServicePfx_emptyCancelationParams() throws Exception {
SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
@@ -226,7 +291,7 @@ public void testCancelationServicePfx_emptyCancelationParams() throws Exception
public void testCancelationServiceUuid_authUser() throws Exception {
SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
CancelationResponse response = null;
- response = (CancelationResponse) app.Cancelation(uuid, rfc, motivo, foliosustitucion);
+ response = (CancelationResponse) app.Cancelation(Utils.uuid, Utils.rfc, "01", Utils.foliosustitucion);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.acuse);
@@ -235,11 +300,12 @@ public void testCancelationServiceUuid_authUser() throws Exception {
String expect_status = "success";
Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
}
- @Ignore
+
+ @Test
public void testCancelationServiceUuid_authToken() throws Exception {
SWCancelationService app = new SWCancelationService(Utils.tokenSW, Utils.urlSW);
CancelationResponse response = null;
- response = (CancelationResponse) app.Cancelation(uuid, rfc, motivo, foliosustitucion);
+ response = (CancelationResponse) app.Cancelation(Utils.uuid, Utils.rfc, "01", Utils.foliosustitucion);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.acuse);
@@ -248,11 +314,12 @@ public void testCancelationServiceUuid_authToken() throws Exception {
String expect_status = "success";
Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
}
+
@Test
public void testCancelationServiceUuid_incorrectParams() throws Exception {
SWCancelationService app = new SWCancelationService(Utils.tokenSW, Utils.urlSW);
CancelationResponse response = null;
- response = (CancelationResponse) app.Cancelation("123456", "123456","12345", "123456");
+ response = (CancelationResponse) app.Cancelation("123456", "123456", "12345", "123456");
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.message);
@@ -260,23 +327,25 @@ public void testCancelationServiceUuid_incorrectParams() throws Exception {
String expect_status = "error";
Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
}
+
@Test
public void testCancelationServiceUuid_incorrectToken() throws Exception {
SWCancelationService app = new SWCancelationService("wrong token", Utils.urlSW);
CancelationResponse response = null;
- response = (CancelationResponse) app.Cancelation(uuid, rfc, motivo, foliosustitucion);
+ response = (CancelationResponse) app.Cancelation(Utils.uuid, Utils.rfc, "01", Utils.foliosustitucion);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.message);
System.out.println(response.messageDetail);
Assert.assertTrue(response.HttpStatusCode == 401);
}
+
@Test
public void testCancelationServiceUuid_emptyUserParams() throws Exception {
try {
SWCancelationService app = new SWCancelationService("", "", "");
CancelationResponse response = null;
- response = (CancelationResponse) app.Cancelation(uuid, rfc, motivo, foliosustitucion);
+ response = (CancelationResponse) app.Cancelation(Utils.uuid, Utils.rfc, "01", Utils.foliosustitucion);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.message);
@@ -287,6 +356,7 @@ public void testCancelationServiceUuid_emptyUserParams() throws Exception {
Assert.assertNotNull("Something bad happened", e);
}
}
+
@Test
public void testCancelationServiceUuid_emptyCancelationParams() throws Exception {
SWCancelationService app = new SWCancelationService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
diff --git a/src/test/java/Tests/Cfdi40/AddendaTest.java b/src/test/java/Tests/Cfdi40/AddendaTest.java
index 9fb3819..4228493 100644
--- a/src/test/java/Tests/Cfdi40/AddendaTest.java
+++ b/src/test/java/Tests/Cfdi40/AddendaTest.java
@@ -1,5 +1,4 @@
package Tests.Cfdi40;
-
import org.junit.Test;
import org.junit.Assert;
import org.junit.Ignore;
diff --git a/src/test/java/Tests/Cfdi40/CFDI40Test.java b/src/test/java/Tests/Cfdi40/CFDI40Test.java
index 08552a0..6be8bf5 100644
--- a/src/test/java/Tests/Cfdi40/CFDI40Test.java
+++ b/src/test/java/Tests/Cfdi40/CFDI40Test.java
@@ -12,26 +12,29 @@
import Utils.Responses.Stamp.SuccessV2Response;
import Utils.Responses.Stamp.SuccessV3Response;
import Utils.Responses.Stamp.SuccessV4Response;
-
/**
-* CFDI40Test
-* Clase para UT de los servicio de timbrado disponibles utilizando diferentes ejemplos de CFDI 4.0
-* @author Eduardo Mares
-* @version 0.0.0.1
-* @since 2022-05-01
-*/
+ * CFDI40Test
+ * Clase para UT de los servicio de timbrado disponibles utilizando diferentes
+ * ejemplos de CFDI 4.0
+ *
+ * @author Eduardo Mares
+ * @version 0.0.0.1
+ * @since 2022-05-01
+ */
public class CFDI40Test {
-
StampService stampService = new StampService(false);
StampService stampServiceToken = new StampService(true);
-
/**
- * Timbrado de CFDI versión 4.0 de tipo ingreso mediante el servicio de timbrado versión 1 de la libreria sdk-java18 mediante usuario y contrasena con respuesta versión 1
- */
- @Ignore
+ * Timbrado de CFDI versión 4.0 de tipo ingreso mediante el servicio de
+ * imbrado
+ * versión 1 de la libreria sdk-java18 mediante usuario y contrasena con
+ * respuesta versión 1
+ */
+ @Test
public void testStampV1IngresoResponseV1() {
- try {
- SuccessV1Response response = stampService.StampResponseV1("src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso.xml", "V1", true, false);
+ try {
+ SuccessV1Response response = stampService
+ .StampResponseV1("src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso.xml", "V1", true, false);
Assert.assertNotNull(response);
Assert.assertNotNull(response.Status);
Assert.assertNotNull(response.tfd);
@@ -44,14 +47,16 @@ public void testStampV1IngresoResponseV1() {
Assert.fail(ex.getMessage());
}
}
-
/**
- * Timbrado de CFDI versión 4.0 de tipo ingreso con nodo parte mediante el servicio de timbrado versión 2 de la libreria sdk-java18 mediante Token con respuesta versión 2
- */
- @Ignore
+ * Timbrado de CFDI versión 4.0 de tipo ingreso con nodo parte mediante el
+ * servicio de timbrado versión 2 de la libreria sdk-java18 mediante Token con
+ * respuesta versión 2
+ */
+ @Test
public void testStampV2IngresoKitParteResponseV2() {
- try {
- SuccessV2Response response = stampServiceToken.StampResponseV2("src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_KitParte.xml", "V2", true, false);
+ try {
+ SuccessV2Response response = stampServiceToken
+ .StampResponseV2("src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_KitParte.xml", "V2", true, false);
Assert.assertNotNull(response);
Assert.assertNotNull(response.Status);
Assert.assertNotNull(response.tfd);
@@ -65,14 +70,17 @@ public void testStampV2IngresoKitParteResponseV2() {
Assert.fail(ex.getMessage());
}
}
-
/**
- * Timbrado de CFDI versión 4.0 de tipo ingreso con nodo ACuentaTerceros mediante el servicio de timbrado versión 2 de la libreria sdk-java18 mediante usuario y contrasena con respuesta versión 3 en base64
- */
- @Ignore
+ * Timbrado de CFDI versión 4.0 de tipo ingreso con nodo ACuentaTerceros
+ * mediante el servicio de timbrado versión 2 de la libreria sdk-java18
+ * ediante
+ * usuario y contrasena con respuesta versión 3 en base64
+ */
+ @Test
public void testStampV2IngresoACuentaTercerosResponseV3B64() {
- try {
- SuccessV3Response response = stampService.StampResponseV3("src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_ACuentaTerceros.xml", "V2", true, true);
+ try {
+ SuccessV3Response response = stampService.StampResponseV3(
+ "src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_ACuentaTerceros.xml", "V2", true, true);
Assert.assertNotNull(response);
Assert.assertNotNull(response.Status);
Assert.assertNotNull(response.cfdi);
@@ -85,14 +93,16 @@ public void testStampV2IngresoACuentaTercerosResponseV3B64() {
Assert.fail(ex.getMessage());
}
}
-
/**
- * Timbrado de CFDI versión 4.0 de tipo ingreso global mediante el servicio de timbrado versión 1 sin sellar (Issue) de la libreria sdk-java18 mediante usuario y contrasena con respuesta versión 4
- */
- @Ignore
+ * Timbrado de CFDI versión 4.0 de tipo ingreso global mediante el servicio de
+ * timbrado versión 1 sin sellar (Issue) de la libreria sdk-java18 mediante
+ * usuario y contrasena con respuesta versión 4
+ */
+ @Test
public void testIssueV1IngresoGlobalResponseV4() {
- try {
- SuccessV4Response response = stampService.StampResponseV4("src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_Global.xml", "IssueV1", false, false);
+ try {
+ SuccessV4Response response = stampService.StampResponseV4(
+ "src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_Global.xml", "IssueV1", false, false);
Assert.assertNotNull(response);
Assert.assertNotNull(response.Status);
Assert.assertNotNull(response.cfdi);
@@ -105,14 +115,16 @@ public void testIssueV1IngresoGlobalResponseV4() {
Assert.fail(ex.getMessage());
}
}
-
/**
- * Timbrado de CFDI versión 4.0 de tipo ingreso global extranjero mediante el servicio de timbrado versión 2 sin sellar (Issue) de la libreria sdk-java18 mediante Token con respuesta versión 4
- */
- @Ignore
+ * Timbrado de CFDI versión 4.0 de tipo ingreso global extranjero mediante el
+ * servicio de timbrado versión 2 sin sellar (Issue) de la libreria sdk-java18
+ * mediante Token con respuesta versión 4
+ */
+ @Test
public void testIssueV2IngresoGlobalExtranjeroResponseV2() {
- try {
- SuccessV2Response response = stampServiceToken.StampResponseV2("src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_GlobalExtranjero.xml", "IssueV2", false, false);
+ try {
+ SuccessV2Response response = stampServiceToken.StampResponseV2(
+ "src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_GlobalExtranjero.xml", "IssueV2", false, false);
Assert.assertNotNull(response);
Assert.assertNotNull(response.Status);
Assert.assertNotNull(response.tfd);
@@ -126,14 +138,16 @@ public void testIssueV2IngresoGlobalExtranjeroResponseV2() {
Assert.fail(ex.getMessage());
}
}
-
/**
- * Timbrado de CFDI versión 4.0 de tipo egreso mediante el servicio de timbrado versión 2 sin sellar (Issue) de la libreria sdk-java18 mediante usuario y contrasena con respuesta versión 4
- */
- @Ignore
+ * Timbrado de CFDI versión 4.0 de tipo egreso mediante el servicio de timbrado
+ * versión 2 sin sellar (Issue) de la libreria sdk-java18 mediante usuario y
+ * contrasena con respuesta versión 4
+ */
+ @Test
public void testIssueV2EgresoNotaDeCreditoResponseV4() {
- try {
- SuccessV4Response response = stampService.StampResponseV4("src/test/resources/CFDI40/CFDI40/CFDI40_Egreso_NotaDeCredito.xml", "IssueV2", false, false);
+ try {
+ SuccessV4Response response = stampService.StampResponseV4(
+ "src/test/resources/CFDI40/CFDI40/CFDI40_Egreso_NotaDeCredito.xml", "IssueV2", false, false);
Assert.assertNotNull(response);
Assert.assertNotNull(response.Status);
Assert.assertNotNull(response.cfdi);
@@ -146,14 +160,16 @@ public void testIssueV2EgresoNotaDeCreditoResponseV4() {
Assert.fail(ex.getMessage());
}
}
-
/**
- * Timbrado de CFDI versión 4.0 de tipo traslado mediante el servicio de timbrado versión 2 sin sellar (Issue) de la libreria sdk-java18 mediante usuario y contrasena con respuesta versión 4
- */
- @Ignore
+ * Timbrado de CFDI versión 4.0 de tipo traslado mediante el servicio de
+ * timbrado versión 2 sin sellar (Issue) de la libreria sdk-java18 mediante
+ * usuario y contrasena con respuesta versión 4
+ */
+ @Test
public void testIssueV2TrasladoResponseV4() {
- try {
- SuccessV4Response response = stampService.StampResponseV4("src/test/resources/CFDI40/CFDI40/CFDI40_Traslado.xml", "IssueV2", false, false);
+ try {
+ SuccessV4Response response = stampService
+ .StampResponseV4("src/test/resources/CFDI40/CFDI40/CFDI40_Traslado.xml", "IssueV2", false, false);
Assert.assertNotNull(response);
Assert.assertNotNull(response.Status);
Assert.assertNotNull(response.cfdi);
@@ -166,14 +182,17 @@ public void testIssueV2TrasladoResponseV4() {
Assert.fail(ex.getMessage());
}
}
-
/**
- * Timbrado de CFDI versión 4.0 de tipo ingreso mediante el servicio de timbrado versión 1 (Json) de la libreria sdk-java18 mediante usuario y contrasena con respuesta versión 1
- */
- @Ignore
+ * Timbrado de CFDI versión 4.0 de tipo ingreso mediante el servicio de
+ * imbrado
+ * versión 1 (Json) de la libreria sdk-java18 mediante usuario y contrasena con
+ * respuesta versión 1
+ */
+ @Test
public void testIssueJsonV1IngresoResponseV1() {
- try {
- SuccessV1Response response = stampService.StampResponseV1("src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso.json", "IssueJsonV1", false, false);
+ try {
+ SuccessV1Response response = stampService.StampResponseV1(
+ "src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso.json", "IssueJsonV1", false, false);
Assert.assertNotNull(response);
Assert.assertNotNull(response.Status);
Assert.assertNotNull(response.tfd);
@@ -186,14 +205,16 @@ public void testIssueJsonV1IngresoResponseV1() {
Assert.fail(ex.getMessage());
}
}
-
/**
- * Timbrado de CFDI versión 4.0 de tipo ingreso con nodo parte mediante el servicio de timbrado versión 1 (Json) de la libreria sdk-java18 mediante Token con respuesta versión 2
- */
- @Ignore
+ * Timbrado de CFDI versión 4.0 de tipo ingreso con nodo parte mediante el
+ * servicio de timbrado versión 1 (Json) de la libreria sdk-java18 mediante
+ * Token con respuesta versión 2
+ */
+ @Test
public void testIssueJsonV1IngresoKitParteResponseV2() {
- try {
- SuccessV2Response response = stampServiceToken.StampResponseV2("src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_KitParte.json", "IssueJsonV1", false, false);
+ try {
+ SuccessV2Response response = stampServiceToken.StampResponseV2(
+ "src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_KitParte.json", "IssueJsonV1", false, false);
Assert.assertNotNull(response);
Assert.assertNotNull(response.Status);
Assert.assertNotNull(response.tfd);
@@ -207,14 +228,17 @@ public void testIssueJsonV1IngresoKitParteResponseV2() {
Assert.fail(ex.getMessage());
}
}
-
/**
- * Timbrado de CFDI versión 4.0 de tipo ingreso con nodo ACuentaTerceros mediante el servicio de timbrado versión 1 (Json) de la libreria sdk-java18 mediante usuario y contrasena con respuesta versión 3
- */
- @Ignore
+ * Timbrado de CFDI versión 4.0 de tipo ingreso con nodo ACuentaTerceros
+ * mediante el servicio de timbrado versión 1 (Json) de la libreria sdk-java18
+ * mediante usuario y contrasena con respuesta versión 3
+ */
+ @Test
public void testIssueJsonV1IngresoACuentaTercerosResponseV3B64() {
- try {
- SuccessV3Response response = stampService.StampResponseV3("src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_ACuentaTerceros.json", "IssueJsonV1", false, false);
+ try {
+ SuccessV3Response response = stampService.StampResponseV3(
+ "src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_ACuentaTerceros.json", "IssueJsonV1", false,
+ false);
Assert.assertNotNull(response);
Assert.assertNotNull(response.Status);
Assert.assertNotNull(response.cfdi);
@@ -227,14 +251,16 @@ public void testIssueJsonV1IngresoACuentaTercerosResponseV3B64() {
Assert.fail(ex.getMessage());
}
}
-
/**
- * Timbrado de CFDI versión 4.0 de tipo ingreso global mediante el servicio de timbrado versión 1 (Json) de la libreria sdk-java18 mediante usuario y contrasena con respuesta versión 4
- */
- @Ignore
+ * Timbrado de CFDI versión 4.0 de tipo ingreso global mediante el servicio de
+ * timbrado versión 1 (Json) de la libreria sdk-java18 mediante usuario y
+ * contrasena con respuesta versión 4
+ */
+ @Test
public void testIssueJsonV1IngresoGlobalResponseV4() {
- try {
- SuccessV4Response response = stampService.StampResponseV4("src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_Global.json", "IssueJsonV1", false, false);
+ try {
+ SuccessV4Response response = stampService.StampResponseV4(
+ "src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_Global.json", "IssueJsonV1", false, false);
Assert.assertNotNull(response);
Assert.assertNotNull(response.Status);
Assert.assertNotNull(response.cfdi);
@@ -247,14 +273,17 @@ public void testIssueJsonV1IngresoGlobalResponseV4() {
Assert.fail(ex.getMessage());
}
}
-
/**
- * Timbrado de CFDI versión 4.0 de tipo ingreso global extranjero mediante el servicio de timbrado versión 1 (Json) de la libreria sdk-java18 mediante Token con respuesta versión 4
- */
- @Ignore
+ * Timbrado de CFDI versión 4.0 de tipo ingreso global extranjero mediante el
+ * servicio de timbrado versión 1 (Json) de la libreria sdk-java18 mediante
+ * Token con respuesta versión 4
+ */
+ @Test
public void testIssueJsonV1IngresoGlobalExtranjeroResponseV4() {
- try {
- SuccessV4Response response = stampServiceToken.StampResponseV4("src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_GlobalExtranjero.json", "IssueJsonV1", false, false);
+ try {
+ SuccessV4Response response = stampServiceToken.StampResponseV4(
+ "src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_GlobalExtranjero.json", "IssueJsonV1", true,
+ false);
Assert.assertNotNull(response);
Assert.assertNotNull(response.Status);
Assert.assertNotNull(response.cfdi);
@@ -267,14 +296,16 @@ public void testIssueJsonV1IngresoGlobalExtranjeroResponseV4() {
Assert.fail(ex.getMessage());
}
}
-
/**
- * Timbrado de CFDI versión 4.0 de tipo egreso mediante el servicio de timbrado versión 1 (Json) de la libreria sdk-java18 mediante usuario y contrasena con respuesta versión 4
- */
- @Ignore
+ * Timbrado de CFDI versión 4.0 de tipo egreso mediante el servicio de timbrado
+ * versión 1 (Json) de la libreria sdk-java18 mediante usuario y contrasena con
+ * respuesta versión 4
+ */
+ @Test
public void testIssueJsonV1EgresoNotaDeCreditoResponseV4() {
- try {
- SuccessV4Response response = stampService.StampResponseV4("src/test/resources/CFDI40/CFDI40/CFDI40_Egreso_NotaDeCredito.json", "IssueJsonV1", false, false);
+ try {
+ SuccessV4Response response = stampService.StampResponseV4(
+ "src/test/resources/CFDI40/CFDI40/CFDI40_Egreso_NotaDeCredito.json", "IssueJsonV1", false, false);
Assert.assertNotNull(response);
Assert.assertNotNull(response.Status);
Assert.assertNotNull(response.cfdi);
@@ -287,14 +318,16 @@ public void testIssueJsonV1EgresoNotaDeCreditoResponseV4() {
Assert.fail(ex.getMessage());
}
}
-
/**
- * Timbrado de CFDI versión 4.0 de tipo traslado mediante el servicio de timbrado versión 1 (Json) de la libreria sdk-java18 mediante usuario y contrasena con respuesta versión 4
- */
- @Ignore
+ * Timbrado de CFDI versión 4.0 de tipo traslado mediante el servicio de
+ * timbrado versión 1 (Json) de la libreria sdk-java18 mediante usuario y
+ * contrasena con respuesta versión 4
+ */
+ @Test
public void testIssueJsonV1TrasladoResponseV4() {
- try {
- SuccessV4Response response = stampService.StampResponseV4("src/test/resources/CFDI40/CFDI40/CFDI40_Traslado.json", "IssueJsonV1", false, false);
+ try {
+ SuccessV4Response response = stampService.StampResponseV4(
+ "src/test/resources/CFDI40/CFDI40/CFDI40_Traslado.json", "IssueJsonV1", false, false);
Assert.assertNotNull(response);
Assert.assertNotNull(response.Status);
Assert.assertNotNull(response.cfdi);
@@ -307,4 +340,4 @@ public void testIssueJsonV1TrasladoResponseV4() {
Assert.fail(ex.getMessage());
}
}
-}
+}
\ No newline at end of file
diff --git a/src/test/java/Tests/Csd/SWCsdServiceTest.java b/src/test/java/Tests/Csd/SWCsdServiceTest.java
index 046ecb4..ae7d15c 100644
--- a/src/test/java/Tests/Csd/SWCsdServiceTest.java
+++ b/src/test/java/Tests/Csd/SWCsdServiceTest.java
@@ -12,16 +12,11 @@
import Utils.Responses.Csd.ListInfoCsdResponse;
public class SWCsdServiceTest {
- public String password_csd = "12345678a";
- public String rfc = "LAN7008173R5";
- public String b64Cer = "MIIF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evdyYWTSceGSrXHmjYzJLBtpc/s77mynNqZEYjhnKk2XRNp6kp/FYRu+QdsX9vaDJbLKR2EnSC4fU6UOTO03IZU15j3wOsg30QrXoKntSJ/beF99cvFHuPrQPWxCtws0lLwkkHNVOm6XNO948Moy1w1pL4i68CwmceYZaYrYhmHGdLuescFQrZQaULDWhpK2Stys8Vs/XwwxNi9MHAFSXpdy/b+Aro5n87w+0MHRcllF8ZKbtQ/ym4oG7aREuo7o71JXJQPjZKTOtVM1EQx/FLM/5brnDSoyvLtoYtv9/tTnIC+8gR6eErkzaGmn8pftPhGNuz6yzx8JeLFoMD7VWbGTefj46KS+yMweFJnpReHEqwnukXpEYq19EWVyQa/Sb7navtKt80y/vRs0aNZp3iL23AOs0u1kQ1CFNY2y12Gor1koaH2FUd5jAQnaSKmgarLy0H/QVvR2g8B3+Fh49QhKYrd8N6LvvI80cwbEoqYWn5DWA=";
-
@Ignore
public void testCargaCsd_authUser() throws Exception {
SWCsdService app = new SWCsdService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
CsdResponse response = null;
- response = (CsdResponse) app.UploadMyCsd(Utils.getCertificadoB64(), Utils.getLlaveB64(), password_csd, "stamp", true);
+ response = (CsdResponse) app.UploadMyCsd(Utils.getCertificadoB64(), Utils.getLlaveB64(), Utils.passwordCsd, "stamp", true);
System.out.println(response.HttpStatusCode);
System.out.println(response.data);
System.out.println(response.Status);
@@ -34,7 +29,7 @@ public void testCargaCsd_authUser() throws Exception {
public void testCargaCsd_authToken() throws Exception {
SWCsdService app = new SWCsdService(Utils.tokenSW, Utils.urlSW);
CsdResponse response = null;
- response = (CsdResponse) app.UploadMyCsd(b64Cer, b64Key, password_csd, "stamp", true);
+ response = (CsdResponse) app.UploadMyCsd(Utils.cerb64, Utils.keyb64, Utils.passwordCsd, "stamp", true);
System.out.println(response.HttpStatusCode);
System.out.println(response.data);
System.out.println(response.Status);
@@ -110,7 +105,7 @@ public void testGetListCsdByType_authUser() throws Exception {
public void testGetListCsdByRfc_authUser() throws Exception {
SWCsdService app = new SWCsdService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
ListInfoCsdResponse response = null;
- response = (ListInfoCsdResponse) app.GetListCsdByRfc("LAN8507268IA");
+ response = (ListInfoCsdResponse) app.GetListCsdByRfc(Utils.rfc);
System.out.println(response.HttpStatusCode);
List lista = response.data;
if(lista != null) {
@@ -135,7 +130,7 @@ public void testGetListCsdByRfc_authUser() throws Exception {
public void testSearchMyCsd_authUser() throws Exception {
SWCsdService app = new SWCsdService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
InfoCsdResponse response = null;
- response = (InfoCsdResponse) app.SearchMyCsd("20001000000300022816");
+ response = (InfoCsdResponse) app.SearchMyCsd(Utils.noCer);
InfoCsd dato = response.data;
System.out.println(response.HttpStatusCode);
System.out.println("Número certificado: " + dato.certificateNumber);
@@ -155,7 +150,7 @@ public void testSearchMyCsd_authUser() throws Exception {
public void testSearchActiveCsd_authUser() throws Exception {
SWCsdService app = new SWCsdService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
InfoCsdResponse response = null;
- response = (InfoCsdResponse) app.SearchActiveCsd("LAN8507268IA", "stamp");
+ response = (InfoCsdResponse) app.SearchActiveCsd(Utils.rfc, "stamp");
InfoCsd dato = response.data;
System.out.println(response.HttpStatusCode);
System.out.println("Número certificado: " + dato.certificateNumber);
diff --git a/src/test/java/Tests/Issue/SWIssueServiceV2Test.java b/src/test/java/Tests/Issue/SWIssueServiceV2Test.java
index b86b281..8493b5d 100644
--- a/src/test/java/Tests/Issue/SWIssueServiceV2Test.java
+++ b/src/test/java/Tests/Issue/SWIssueServiceV2Test.java
@@ -28,31 +28,7 @@ public void testFirst() throws AuthException, GeneralException, IOException {
Assert.assertNotNull(response.cfdi);
Assert.assertTrue(!response.cfdi.equalsIgnoreCase(""));
}
- @Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1() throws Exception {
- SWIssueServiceV2 api = new SWIssueServiceV2(Utils.userSW, Utils.passwordSW, Utils.urlSW);
- SuccessV1Response response = null;
- response = (SuccessV1Response) api.IssueXml(ut.StringgenBasicoTimbrePrevio(false), "v1");
- System.out.println(response.Status);
- System.out.println(response.HttpStatusCode);
- System.out.println(response.tfd);
- System.out.println(response.message);
- String expect_error = "307. El comprobante contiene un timbre previo.";
- Assert.assertTrue(response.tfd.equalsIgnoreCase("") && expect_error.equalsIgnoreCase(response.message));
- }
- @Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2() throws Exception {
- SWIssueServiceV2 api = new SWIssueServiceV2(Utils.userSW, Utils.passwordSW, Utils.urlSW);
- SuccessV2Response response = null;
- response = (SuccessV2Response) api.IssueXml(ut.StringgenBasicoTimbrePrevio(false), "v2");
- System.out.println(response.Status);
- System.out.println(response.HttpStatusCode);
- System.out.println(response.tfd);
- System.out.println(response.cfdi);
- String expect_error = "307. El comprobante contiene un timbre previo.";
- Assert.assertTrue(response.tfd.equalsIgnoreCase("") && expect_error.equalsIgnoreCase(response.message));
- }
- @Ignore
+ @Test
public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3() throws Exception {
SWIssueServiceV2 api = new SWIssueServiceV2(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV3Response response = null;
diff --git a/src/test/java/Tests/Pdf/SWPdfServiceTest.java b/src/test/java/Tests/Pdf/SWPdfServiceTest.java
index a4f37e5..f2710f7 100644
--- a/src/test/java/Tests/Pdf/SWPdfServiceTest.java
+++ b/src/test/java/Tests/Pdf/SWPdfServiceTest.java
@@ -10,10 +10,12 @@
import Utils.Responses.Pdf.PdfResponse;
import Utils.Responses.Stamp.SuccessV3Response;
+import java.io.Console;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
+import org.apache.commons.logging.Log;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Rule;
@@ -270,4 +272,38 @@ public void GeneratePdf_CP20__Success() throws AuthException, GeneralException,
Assert.assertTrue(false);
}
}
+ @Test
+ public void RegeneratePdf_Success() throws GeneralException, AuthException, IOException {
+ SWPdfService pdf = new SWPdfService(Utils.tokenSW, Utils.urlApiSW);
+ PdfResponse response = (PdfResponse)pdf.RegeneratePdf("4714f6f7-ccb4-4eb5-8ba6-3a523092e2b4");
+ Assert.assertNotNull(response);
+ System.out.println(response.message);
+ Assert.assertTrue(response.Status.equals("success"));
+ Assert.assertTrue(!response.message.isEmpty());
+ }
+ @Test
+ public void RegeneratePdf_Auth_Success() throws AuthException, GeneralException, IOException{
+ SWPdfService pdf = new SWPdfService(Utils.userSW, Utils.passwordSW, Utils.urlApiSW, Utils.urlSW);
+ PdfResponse response = (PdfResponse)pdf.RegeneratePdf("4714f6f7-ccb4-4eb5-8ba6-3a523092e2b4");
+ Assert.assertNotNull(response);
+ System.out.println(response.message);
+ Assert.assertTrue(response.Status.equals("success"));
+ Assert.assertTrue(!response.message.isEmpty());
+ }
+ @Test
+ public void RegeneratePdf_Error() throws GeneralException, AuthException, IOException{
+ SWPdfService pdf = new SWPdfService(Utils.tokenSW, Utils.urlApiSW);
+ PdfResponse response = (PdfResponse)pdf.RegeneratePdf(null);
+ Assert.assertNotNull(response);
+ Assert.assertTrue(response.Status.equals("error"));
+ Assert.assertTrue(!response.message.isEmpty());
+ }
+ @Test
+ public void RegeneratePdf_Auth_Error() throws AuthException, GeneralException, IOException{
+ SWPdfService pdf = new SWPdfService(Utils.userSW, Utils.passwordSW, Utils.urlApiSW, Utils.urlSW);
+ PdfResponse response = (PdfResponse)pdf.RegeneratePdf("496c20ab-5e0a-47d8-85ac-9a82dd89f4b4");
+ Assert.assertNotNull(response);
+ Assert.assertTrue(response.Status.equals("error"));
+ Assert.assertTrue(!response.message.isEmpty());
+ }
}
diff --git a/src/test/java/Tests/Pendings/SWPendingsServiceTest.java b/src/test/java/Tests/Pendings/SWPendingsServiceTest.java
index 94e0a2b..d4cb2b7 100644
--- a/src/test/java/Tests/Pendings/SWPendingsServiceTest.java
+++ b/src/test/java/Tests/Pendings/SWPendingsServiceTest.java
@@ -11,19 +11,11 @@
import Utils.Responses.Pendings.PendientesCancelarResponse;
public class SWPendingsServiceTest {
- public String uuid = "06a46e4b-b154-4c12-bb77-f9a63ed55ff2";
- public String password_csd = "12345678a";
- public String rfc = "LAN7008173R5";
- public String b64Cer = "MIIFxTCCA62gAwIBAgIUMjAwMDEwMDAwMDAzMDAwMjI4MTUwDQYJKoZIhvcNAQELBQAwggFmMSAwHgYDVQQDDBdBLkMuIDIgZGUgcHJ1ZWJhcyg0MDk2KTEvMC0GA1UECgwmU2VydmljaW8gZGUgQWRtaW5pc3RyYWNpw7NuIFRyaWJ1dGFyaWExODA2BgNVBAsML0FkbWluaXN0cmFjacOzbiBkZSBTZWd1cmlkYWQgZGUgbGEgSW5mb3JtYWNpw7NuMSkwJwYJKoZIhvcNAQkBFhphc2lzbmV0QHBydWViYXMuc2F0LmdvYi5teDEmMCQGA1UECQwdQXYuIEhpZGFsZ28gNzcsIENvbC4gR3VlcnJlcm8xDjAMBgNVBBEMBTA2MzAwMQswCQYDVQQGEwJNWDEZMBcGA1UECAwQRGlzdHJpdG8gRmVkZXJhbDESMBAGA1UEBwwJQ295b2Fjw6FuMRUwEwYDVQQtEwxTQVQ5NzA3MDFOTjMxITAfBgkqhkiG9w0BCQIMElJlc3BvbnNhYmxlOiBBQ0RNQTAeFw0xNjEwMjUyMTUyMTFaFw0yMDEwMjUyMTUyMTFaMIGxMRowGAYDVQQDExFDSU5ERU1FWCBTQSBERSBDVjEaMBgGA1UEKRMRQ0lOREVNRVggU0EgREUgQ1YxGjAYBgNVBAoTEUNJTkRFTUVYIFNBIERFIENWMSUwIwYDVQQtExxMQU43MDA4MTczUjUgLyBGVUFCNzcwMTE3QlhBMR4wHAYDVQQFExUgLyBGVUFCNzcwMTE3TURGUk5OMDkxFDASBgNVBAsUC1BydWViYV9DRkRJMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAgvvCiCFDFVaYX7xdVRhp/38ULWto/LKDSZy1yrXK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DMA, OID.2.5.4.45=SAT970701NN3, L=Coyoac?n, S=Distrito Federal, C=MX, PostalCode=06300, STREET=\"Av. Hidalgo 77, Col. Guerrero\", E=asisnet@pruebas.sat.gob.mx, OU=Administraci?n de Seguridad de la Informaci?n, O=Servicio de Administraci?n Tributaria, CN=A.C. 2 de pruebas(4096)3230303031303030303030333030303232383135MIIFxTCCA62gAwIBAgIUMjAwMDEwMDAwMDAzMDAwMjI4MTUwDQYJKoZIhvcNAQELBQAwggFmMSAwHgYDVQQDDBdBLkMuIDIgZGUgcHJ1ZWJhcyg0MDk2KTEvMC0GA1UECgwmU2VydmljaW8gZGUgQWRtaW5pc3RyYWNpw7NuIFRyaWJ1dGFyaWExODA2BgNVBAsML0FkbWluaXN0cmFjacOzbiBkZSBTZWd1cmlkYWQgZGUgbGEgSW5mb3JtYWNpw7NuMSkwJwYJKoZIhvcNAQkBFhphc2lzbmV0QHBydWViYXMuc2F0LmdvYi5teDEmMCQGA1UECQwdQXYuIEhpZGFsZ28gNzcsIENvbC4gR3VlcnJlcm8xDjAMBgNVBBEMBTA2MzAwMQswCQYDVQQGEwJNWDEZMBcGA1UECAwQRGlzdHJpdG8gRmVkZXJhbDESMBAGA1UEBwwJQ295b2Fjw6FuMRUwEwYDVQQtEwxTQVQ5NzA3MDFOTjMxITAfBgkqhkiG9w0BCQIMElJlc3BvbnNhYmxlOiBBQ0RNQTAeFw0xNjEwMjUyMTUyMTFaFw0yMDEwMjUyMTUyMTFaMIGxMRowGAYDVQQDExFDSU5ERU1FWCBTQSBERSBDVjEaMBgGA1UEKRMRQ0lOREVNRVggU0EgREUgQ1YxGjAYBgNVBAoTEUNJTkRFTUVYIFNBIERFIENWMSUwIwYDVQQtExxMQU43MDA4MTczUjUgLyBGVUFCNzcwMTE3QlhBMR4wHAYDVQQFExUgLyBGVUFCNzcwMTE3TURGUk5OMDkxFDASBgNVBAsUC1BydWViYV9DRkRJMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC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aTRO17lDuWM8dARfIDqoV+o3wF4wvcBHy+NHkvJ8aNNhdv0gxoxQdDTh1VvhFG7Ij7487kicwIFpOXjDu/A+JzfutXpXemRkDAXMm3D/vDX0yKIyzHUNFzxEQDeAo/UZAfLMEbCE6XTjcrX5Gu/xoqC5NA/J389Wl3sMyAQxynsTld6yZlTid4rPpgxjbTm0m8yMyv+zvZNQFNjUxXgHyog36be5LIu7IU6zUj8hvl+jOG78a+lra+mXEKvowo/9/UEWZCZDUvWPbka67SLOLDdPrRwJB+KqNdMMkGZwfRauDyrvFi25yV87NtrHFQXz/9FNqIuGuRz7i1suDB+WPdk7Rc3CPYoK30IRo0Ae74mdA+AN07lQC7Q8FicpTDlNjqh+VV5nqLht8wzzq/l1QFgcjxgp23520G/YpCGhseJv2PWcV0H1rs0coAi3qCr7G+A2MYwGJA4DCAfD92xZWtZgPUpPSELvEBgWqMsW87xd1MSkumJ8e7zGOMXoFRo3ID4wot1FIaWU/EJyzb3xowrbY64Ytquuu9s9ef0weTumPMvkWcnGeqgKaEMnl24Is6CoG+qS+HfvgS8qxiv1TfTTIRmT0nhYWRoEkE/0ue6X4Zs+qT28Z8P/LzcIJECJvd39K5BI0q3RMqEVumgVcKGPB9nkxReDPR1M/cxY9qru99NaOK0dZJAin5AXDVOrCZzOdLeEU5lIRXWZwr9i1/rVvLh6f3tnhVWgbghp+JsuhaX2ALRY74pAosbzVMZJlf31TElMCMGCSqGSIb3DQEJFTEWBBTV2Mqe5ylxDwy8SvKAi/DPPo81QzAxMCEwCQYFKw4DAhoFAAQUro+9ySRmBaYPd9oC4rXFvP20CPkECEuQk0rStkWzAgIIAA==";
@Ignore
public void testPendientesCancelarService() throws Exception {
SWPendingsService app = new SWPendingsService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
- String rfc = "LAN7008173R5";
PendientesCancelarResponse response = null;
- response = (PendientesCancelarResponse) app.PendientesPorCancelar(rfc);
+ response = (PendientesCancelarResponse) app.PendientesPorCancelar(Utils.rfc);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.message);
diff --git a/src/test/java/Tests/Relations/SWRelationsServiceTest.java b/src/test/java/Tests/Relations/SWRelationsServiceTest.java
index 0694d0f..629de45 100644
--- a/src/test/java/Tests/Relations/SWRelationsServiceTest.java
+++ b/src/test/java/Tests/Relations/SWRelationsServiceTest.java
@@ -11,18 +11,11 @@
import Utils.Responses.Relations.RelacionData;
public class SWRelationsServiceTest {
- public String uuid = "52C02B64-D12E-4163-B581-BF749238896D";
- public String password_csd = "12345678a";
- public String rfc = "LAN7008173R5";
- public String b64Cer = "MIIFxTCCA62gAwIBAgIUMjAwMDEwMDAwMDAzMDAwMjI4MTUwDQYJKoZIhvcNAQELBQAwggFmMSAwHgYDVQQDDBdBLkMuIDIgZGUgcHJ1ZWJhcyg0MDk2KTEvMC0GA1UECgwmU2VydmljaW8gZGUgQWRtaW5pc3RyYWNpw7NuIFRyaWJ1dGFyaWExODA2BgNVBAsML0FkbWluaXN0cmFjacOzbiBkZSBTZWd1cmlkYWQgZGUgbGEgSW5mb3JtYWNpw7NuMSkwJwYJKoZIhvcNAQkBFhphc2lzbmV0QHBydWViYXMuc2F0LmdvYi5teDEmMCQGA1UECQwdQXYuIEhpZGFsZ28gNzcsIENvbC4gR3VlcnJlcm8xDjAMBgNVBBEMBTA2MzAwMQswCQYDVQQGEwJNWDEZMBcGA1UECAwQRGlzdHJpdG8gRmVkZXJhbDESMBAGA1UEBwwJQ295b2Fjw6FuMRUwEwYDVQQtEwxTQVQ5NzA3MDFOTjMxITAfBgkqhkiG9w0BCQIMElJlc3BvbnNhYmxlOiBBQ0RNQTAeFw0xNjEwMjUyMTUyMTFaFw0yMDEwMjUyMTUyMTFaMIGxMRowGAYDVQQDExFDSU5ERU1FWCBTQSBERSBDVjEaMBgGA1UEKRMRQ0lOREVNRVggU0EgREUgQ1YxGjAYBgNVBAoTEUNJTkRFTUVYIFNBIERFIENWMSUwIwYDVQQtExxMQU43MDA4MTczUjUgL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9A815dA3J4JgpBUNzbOz9VlhvdZMJskrHxzZ5riU1TAuSw/oi68dJfA7S+6XrTmeFDQzYxACHyOzj24RjLi/31+Fc/wiqQXNu9O6oWl8p5+GVoz2xtU4aRqLxVh73L6WAAef/WDeKDMfIge1BtMrxYw==OID.1.2.840.113549.1.9.2=Responsable: ACDMA, OID.2.5.4.45=SAT970701NN3, L=Coyoac?n, S=Distrito Federal, C=MX, PostalCode=06300, STREET=\"Av. Hidalgo 77, Col. Guerrero\", E=asisnet@pruebas.sat.gob.mx, OU=Administraci?n de Seguridad de la Informaci?n, O=Servicio de Administraci?n Tributaria, CN=A.C. 2 de pruebas(4096)3230303031303030303030333030303232383135MIIFxTCCA62gAwIBAgIUMjAwMDEwMDAwMDAzMDAwMjI4MTUwDQYJKoZIhvcNAQELBQAwggFmMSAwHgYDVQQDDBdBLkMuIDIgZGUgcHJ1ZWJhcyg0MDk2KTEvMC0GA1UECgwmU2VydmljaW8gZGUgQWRtaW5pc3RyYWNpw7NuIFRyaWJ1dGFyaWExODA2BgNVBAsML0FkbWluaXN0cmFjacOzbiBkZSBTZWd1cmlkYWQgZGUgbGEgSW5mb3JtYWNpw7NuMSkwJwYJKoZIhvcNAQkBFhphc2lzbmV0QHBydWViYXMuc2F0LmdvYi5teDEmMCQGA1UECQwdQXYuIEhpZGFsZ28gNzcsIENvbC4gR3VlcnJlcm8xDjAMBgNVBBEMBTA2MzAwMQswCQYDVQQGEwJNWDEZMBcGA1UECAwQRGlzdHJpdG8gRmVkZXJhbDESMBAGA1UEBwwJQ295b2Fjw6FuMRUwEwYDVQQtEwxTQVQ5NzA3MDFOTjMxITAfBgkqhkiG9w0BCQIMElJlc3BvbnNhYmxlOiBBQ0RNQTAeFw0xNjEwMjUyMTUyMTFaFw0yMDEwMjUyMTUyMTFaMIGxMRowGAYDVQQDExFDSU5ERU1FWCBTQSBERSBDVjEaMBgGA1UEKRMRQ0lOREVNRVggU0EgREUgQ1YxGjAYBgNVBAoTEUNJTkRFTU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ignore
public void testCfdiRelacionadosService_CSD() throws Exception {
SWRelationsService app = new SWRelationsService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
CfdiRelacionadosResponse response = null;
- response = (CfdiRelacionadosResponse) app.CfdiRelacionadosCSD(uuid, password_csd, rfc, b64Cer, b64Key);
+ response = (CfdiRelacionadosResponse) app.CfdiRelacionadosCSD(Utils.uuid, Utils.passwordCsd, Utils.rfc, Utils.cerb64, Utils.keyb64);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.resultado);
@@ -53,7 +46,7 @@ public void testCfdiRelacionadosService_CSD() throws Exception {
public void testCfdiRelacionadosService_Pfx() throws Exception {
SWRelationsService app = new SWRelationsService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
CfdiRelacionadosResponse response = null;
- response = (CfdiRelacionadosResponse) app.CfdiRelacionadosPFX(uuid, password_csd, rfc, b64Pfx);
+ response = (CfdiRelacionadosResponse) app.CfdiRelacionadosPFX(Utils.uuid, Utils.passwordPfx, Utils.rfc, Utils.pfxb64);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.resultado);
@@ -116,7 +109,7 @@ public void testCfdiRelacionadosService_Xml() throws Exception {
public void testCfdiRelacionadosService_UUID() throws Exception {
SWRelationsService app = new SWRelationsService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
CfdiRelacionadosResponse response = null;
- response = (CfdiRelacionadosResponse) app.CfdiRelacionadosUUID(uuid, rfc);
+ response = (CfdiRelacionadosResponse) app.CfdiRelacionadosUUID(Utils.uuid, Utils.rfc);
System.out.println(response.Status);
System.out.println(response.HttpStatusCode);
System.out.println(response.resultado);
diff --git a/src/test/java/Tests/Stamp/SWStampServiceTest.java b/src/test/java/Tests/Stamp/SWStampServiceTest.java
index d3d9e73..9286db7 100644
--- a/src/test/java/Tests/Stamp/SWStampServiceTest.java
+++ b/src/test/java/Tests/Stamp/SWStampServiceTest.java
@@ -137,9 +137,10 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_b64() throws Exceptio
Assert.assertTrue(valid_cfdi && valid_qr && valid_sellocfdi && valid_sellosat);
}
- // cc10 XML
+ // cc11 XML
@Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_CC10() throws Exception {
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_CC11() throws Exception {
SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV1Response response = null;
Utils ut = new Utils();
@@ -152,7 +153,8 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_CC10() throws Excepti
Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
}
@Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_CC10() throws Exception {
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_CC11() throws Exception {
SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV2Response response = null;
Utils ut = new Utils();
@@ -166,7 +168,8 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_CC10() throws Excepti
Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
}
@Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_CC10() throws Exception {
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_CC11() throws Exception {
SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV3Response response = null;
Utils ut = new Utils();
@@ -178,7 +181,8 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_CC10() throws Excepti
Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
}
@Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_CC10() throws Exception {
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_CC11() throws Exception {
SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV4Response response = null;
Utils ut = new Utils();
@@ -198,7 +202,7 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_CC10() throws Excepti
}
@Test
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_b64_CC10() throws Exception {
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_b64_CC11() throws Exception {
SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV1Response response = null;
Utils ut = new Utils();
@@ -209,7 +213,7 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_b64_CC10() throws Exc
Assert.assertTrue(Utils.isValidB64(response.tfd));
}
@Test
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_b64_CC10() throws Exception {
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_b64_CC11() throws Exception {
SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV2Response response = null;
Utils ut = new Utils();
@@ -222,7 +226,7 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_b64_CC10() throws Exc
Assert.assertTrue(cfdi_valid && tfd_valid);
}
@Test
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_b64_CC10() throws Exception {
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_b64_CC11() throws Exception {
SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV3Response response = null;
Utils ut = new Utils();
@@ -233,7 +237,7 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_b64_CC10() throws Exc
Assert.assertTrue(Utils.isValidB64(response.cfdi));
}
@Test
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_b64_CC10() throws Exception {
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_b64_CC11() throws Exception {
SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV4Response response = null;
Utils ut = new Utils();
@@ -256,13 +260,13 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_b64_CC10() throws Exc
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////// PAGOS10/////////////////////////////////////////////////////////////////////////////////////////
- @Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_PAGOS10() throws Exception {
+ ////////////////////////////////////////// PAGOS20/////////////////////////////////////////////////////////////////////////////////////////
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_PAGOS20() throws Exception {
SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV1Response response = null;
Utils ut = new Utils();
- response = (SuccessV1Response) api.Stamp(ut.genPagos10(false), "v1");
+ response = (SuccessV1Response) api.Stamp(ut.genPagos20(false), "v1");
System.out.println(response.Status);
System.out.println(response.message);
System.out.println(response.HttpStatusCode);
@@ -271,12 +275,12 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_PAGOS10() throws Exce
Assert.assertTrue(
expect_status.equalsIgnoreCase(response.Status));
}
- @Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_PAGOS10() throws Exception {
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_PAGOS20() throws Exception {
SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV2Response response = null;
Utils ut = new Utils();
- response = (SuccessV2Response) api.Stamp(ut.genPagos10(false), "v2");
+ response = (SuccessV2Response) api.Stamp(ut.genPagos20(false), "v2");
System.out.println(response.Status);
System.out.println(response.message);
System.out.println(response.HttpStatusCode);
@@ -285,12 +289,12 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_PAGOS10() throws Exce
String expect_status = "success";
Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
}
- @Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_PAGOS10() throws Exception {
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_PAGOS20() throws Exception {
SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV3Response response = null;
Utils ut = new Utils();
- response = (SuccessV3Response) api.Stamp(ut.genPagos10(false), "v3");
+ response = (SuccessV3Response) api.Stamp(ut.genPagos20(false), "v3");
System.out.println(response.Status);
System.out.println(response.message);
System.out.println(response.HttpStatusCode);
@@ -299,12 +303,12 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_PAGOS10() throws Exce
String expect_status = "success";
Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
}
- @Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_PAGOS10() throws Exception {
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_PAGOS20() throws Exception {
SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV4Response response = null;
Utils ut = new Utils();
- response = (SuccessV4Response) api.Stamp(ut.genPagos10(false), "V4");
+ response = (SuccessV4Response) api.Stamp(ut.genPagos20(false), "V4");
System.out.println(response.Status);
System.out.println(response.cfdi);
System.out.println(response.qrCode);
@@ -320,11 +324,11 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_PAGOS10() throws Exce
}
@Test
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_b64_PAGOS10() throws Exception {
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_b64_PAGOS20() throws Exception {
SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV1Response response = null;
Utils ut = new Utils();
- response = (SuccessV1Response) api.Stamp(ut.genPagos10(true), "v1", true);
+ response = (SuccessV1Response) api.Stamp(ut.genPagos20(true), "v1", true);
System.out.println(response.Status);
System.out.println(response.message);
System.out.println(response.HttpStatusCode);
@@ -332,11 +336,11 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_b64_PAGOS10() throws
Assert.assertTrue(Utils.isValidB64(response.tfd));
}
@Test
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_b64_PAGOS10() throws Exception {
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_b64_PAGOS20() throws Exception {
SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV2Response response = null;
Utils ut = new Utils();
- response = (SuccessV2Response) api.Stamp(ut.genPagos10(true), "v2", true);
+ response = (SuccessV2Response) api.Stamp(ut.genPagos20(true), "v2", true);
System.out.println(response.Status);
System.out.println(response.message);
System.out.println(response.HttpStatusCode);
@@ -347,11 +351,11 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_b64_PAGOS10() throws
}
@Test
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_b64_PAGOS10() throws Exception {
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_b64_PAGOS20() throws Exception {
SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV3Response response = null;
Utils ut = new Utils();
- response = (SuccessV3Response) api.Stamp(ut.genPagos10(true), "v3", true);
+ response = (SuccessV3Response) api.Stamp(ut.genPagos20(true), "v3", true);
System.out.println(response.Status);
System.out.println(response.message);
System.out.println(response.HttpStatusCode);
@@ -359,11 +363,11 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_b64_PAGOS10() throws
Assert.assertTrue(Utils.isValidB64(response.cfdi));
}
@Test
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_b64_PAGOS10() throws Exception {
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_b64_PAGOS20() throws Exception {
SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV4Response response = null;
Utils ut = new Utils();
- response = (SuccessV4Response) api.Stamp(ut.genPagos10(true), "V4", true);
+ response = (SuccessV4Response) api.Stamp(ut.genPagos20(true), "V4", true);
System.out.println(response.Status);
System.out.println(response.message);
System.out.println(response.cfdi);
diff --git a/src/test/java/Tests/Stamp/SWStampServiceV2Test.java b/src/test/java/Tests/Stamp/SWStampServiceV2Test.java
index 9707354..50667e2 100644
--- a/src/test/java/Tests/Stamp/SWStampServiceV2Test.java
+++ b/src/test/java/Tests/Stamp/SWStampServiceV2Test.java
@@ -30,10 +30,7 @@ public void testFirst() throws AuthException, GeneralException, IOException {
response = (SuccessV3Response) api.Stamp(ut.genNomina12(false), "v3");
Assert.assertNotNull(response.cfdi);
Assert.assertTrue(!response.cfdi.equalsIgnoreCase(""));
- response = (SuccessV3Response) api.Stamp(ut.genComercioExterior(false), "v3");
- Assert.assertNotNull(response.cfdi);
- Assert.assertTrue(!response.cfdi.equalsIgnoreCase(""));
- response = (SuccessV3Response) api.Stamp(ut.genPagos10(false), "v3");
+ response = (SuccessV3Response) api.Stamp(ut.genPagos20(false), "v3");
Assert.assertNotNull(response.cfdi);
Assert.assertTrue(!response.cfdi.equalsIgnoreCase(""));
}
@@ -161,9 +158,10 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_b64() throws Exceptio
&& expect_error.equalsIgnoreCase(response.message));
}
- // cc10 XML
+ // cc11 XML
@Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_CC10() throws Exception {
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_CC11() throws Exception {
SWStampServiceV2 api = new SWStampServiceV2(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV1Response response = null;
response = (SuccessV1Response) api.Stamp(ut.genComercioExterior(false), "v1");
@@ -176,7 +174,8 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_CC10() throws Excepti
Assert.assertTrue((!response.tfd.equalsIgnoreCase("") && expect_error.equalsIgnoreCase(response.message)) || response.Status.equalsIgnoreCase("success"));
}
@Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_CC10() throws Exception {
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_CC11() throws Exception {
SWStampServiceV2 api = new SWStampServiceV2(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV2Response response = null;
response = (SuccessV2Response) api.Stamp(ut.genComercioExterior(false), "v2");
@@ -190,7 +189,8 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_CC10() throws Excepti
Assert.assertTrue((!response.tfd.equalsIgnoreCase("") && expect_error.equalsIgnoreCase(response.message)) || response.Status.equalsIgnoreCase("success"));
}
@Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_CC10() throws Exception {
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_CC11() throws Exception {
SWStampServiceV2 api = new SWStampServiceV2(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV3Response response = null;
response = (SuccessV3Response) api.Stamp(ut.genComercioExterior(false), "v3");
@@ -202,7 +202,8 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_CC10() throws Excepti
Assert.assertTrue((!response.cfdi.equalsIgnoreCase("") && expect_error.equalsIgnoreCase(response.message)) || response.Status.equalsIgnoreCase("success"));
}
@Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_CC10() throws Exception {
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_CC11() throws Exception {
SWStampServiceV2 api = new SWStampServiceV2(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV4Response response = null;
response = (SuccessV4Response) api.Stamp(ut.genComercioExterior(false), "V4");
@@ -281,12 +282,12 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_b64_CC10() throws Exc
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- ////////////////////////////////////////// PAGOS10/////////////////////////////////////////////////////////////////////////////////////////
- @Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_PAGOS10() throws Exception {
+ ////////////////////////////////////////// PAGOS20/////////////////////////////////////////////////////////////////////////////////////////
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_PAGOS20() throws Exception {
SWStampServiceV2 api = new SWStampServiceV2(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV1Response response = null;
- response = (SuccessV1Response) api.Stamp(ut.genPagos10(false), "v1");
+ response = (SuccessV1Response) api.Stamp(ut.genPagos20(false), "v1");
System.out.println(response.Status);
System.out.println(response.message);
System.out.println(response.HttpStatusCode);
@@ -295,11 +296,11 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_PAGOS10() throws Exce
String expect_error = "307. El comprobante contiene un timbre previo.";
Assert.assertTrue((!response.tfd.equalsIgnoreCase("") && expect_error.equalsIgnoreCase(response.message)) || response.Status.equalsIgnoreCase("success"));
}
- @Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_PAGOS10() throws Exception {
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_PAGOS20() throws Exception {
SWStampServiceV2 api = new SWStampServiceV2(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV2Response response = null;
- response = (SuccessV2Response) api.Stamp(ut.genPagos10(false), "v2");
+ response = (SuccessV2Response) api.Stamp(ut.genPagos20(false), "v2");
System.out.println(response.Status);
System.out.println(response.message);
System.out.println(response.HttpStatusCode);
@@ -309,11 +310,11 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_PAGOS10() throws Exce
String expect_error = "307. El comprobante contiene un timbre previo.";
Assert.assertTrue((!response.tfd.equalsIgnoreCase("") && expect_error.equalsIgnoreCase(response.message)) || response.Status.equalsIgnoreCase("success"));
}
- @Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_PAGOS10() throws Exception {
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_PAGOS20() throws Exception {
SWStampServiceV2 api = new SWStampServiceV2(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV3Response response = null;
- response = (SuccessV3Response) api.Stamp(ut.genPagos10(false), "v3");
+ response = (SuccessV3Response) api.Stamp(ut.genPagos20(false), "v3");
System.out.println(response.Status);
System.out.println(response.message);
System.out.println(response.HttpStatusCode);
@@ -323,11 +324,11 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_PAGOS10() throws Exce
String expect_error = "307. El comprobante contiene un timbre previo.";
Assert.assertTrue((!response.cfdi.equalsIgnoreCase("") && expect_error.equalsIgnoreCase(response.message)) || response.Status.equalsIgnoreCase("success"));
}
- @Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_PAGOS10() throws Exception {
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_PAGOS20() throws Exception {
SWStampServiceV2 api = new SWStampServiceV2(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV4Response response = null;
- response = (SuccessV4Response) api.Stamp(ut.genPagos10(false), "V4");
+ response = (SuccessV4Response) api.Stamp(ut.genPagos20(false), "V4");
System.out.println(response.Status);
System.out.println(response.cfdi);
System.out.println(response.qrCode);
@@ -342,11 +343,11 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_PAGOS10() throws Exce
String expect_error = "307. El comprobante contiene un timbre previo.";
Assert.assertTrue((!response.cfdi.equalsIgnoreCase("") && expect_error.equalsIgnoreCase(response.message)) || response.Status.equalsIgnoreCase("success"));
}
- @Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_b64_PAGOS10() throws Exception {
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_b64_PAGOS20() throws Exception {
SWStampServiceV2 api = new SWStampServiceV2(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV1Response response = null;
- response = (SuccessV1Response) api.Stamp(ut.genPagos10TimbrePrevio(true), "v1", true);
+ response = (SuccessV1Response) api.Stamp(ut.genPagos20TimbrePrevio(true), "v1", true);
System.out.println(response.Status);
System.out.println(response.message);
System.out.println(response.HttpStatusCode);
@@ -354,11 +355,11 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V1_b64_PAGOS10() throws
String expect_error = "307. El comprobante contiene un timbre previo.";
Assert.assertTrue(Utils.isValidB64(response.tfd) && expect_error.equalsIgnoreCase(response.message));
}
- @Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_b64_PAGOS10() throws Exception {
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_b64_PAGOS20() throws Exception {
SWStampServiceV2 api = new SWStampServiceV2(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV2Response response = null;
- response = (SuccessV2Response) api.Stamp(ut.genPagos10TimbrePrevio(true), "v2", true);
+ response = (SuccessV2Response) api.Stamp(ut.genPagos20TimbrePrevio(true), "v2", true);
System.out.println(response.Status);
System.out.println(response.message);
System.out.println(response.HttpStatusCode);
@@ -369,11 +370,11 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V2_b64_PAGOS10() throws
Assert.assertTrue(cfdi_valid && tfd_valid && expect_error.equalsIgnoreCase(response.message));
}
- @Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_b64_PAGOS10() throws Exception {
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_b64_PAGOS20() throws Exception {
SWStampServiceV2 api = new SWStampServiceV2(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV3Response response = null;
- response = (SuccessV3Response) api.Stamp(ut.genPagos10TimbrePrevio(true), "v3", true);
+ response = (SuccessV3Response) api.Stamp(ut.genPagos20TimbrePrevio(true), "v3", true);
System.out.println(response.Status);
System.out.println(response.message);
System.out.println(response.HttpStatusCode);
@@ -381,11 +382,11 @@ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V3_b64_PAGOS10() throws
String expect_error = "307. El comprobante contiene un timbre previo.";
Assert.assertTrue(Utils.isValidB64(response.cfdi) && expect_error.equalsIgnoreCase(response.message));
}
- @Ignore
- public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_b64_PAGOS10() throws Exception {
+ @Test
+ public void testStampREAL_XML_STRING_USER_PASSWORD_AUTH_V4_b64_PAGOS20() throws Exception {
SWStampServiceV2 api = new SWStampServiceV2(Utils.userSW, Utils.passwordSW, Utils.urlSW);
SuccessV4Response response = null;
- response = (SuccessV4Response) api.Stamp(ut.genPagos10TimbrePrevio(true), "V4", true);
+ response = (SuccessV4Response) api.Stamp(ut.genPagos20TimbrePrevio(true), "V4", true);
System.out.println(response.Status);
System.out.println(response.message);
System.out.println(response.cfdi);
diff --git a/src/test/java/Tests/Stamp/SWStampsServiceZipTest.java b/src/test/java/Tests/Stamp/SWStampsServiceZipTest.java
new file mode 100644
index 0000000..d0a099a
--- /dev/null
+++ b/src/test/java/Tests/Stamp/SWStampsServiceZipTest.java
@@ -0,0 +1,80 @@
+package Tests.Stamp;
+
+import Services.Stamp.SWStampService;
+import Tests.Utils;
+import Utils.Responses.*;
+import Utils.Responses.Stamp.SuccessV1Response;
+
+import org.apache.commons.ssl.Util;
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import java.nio.file.Files;
+import java.nio.file.Paths;
+
+public class SWStampsServiceZipTest {
+ @Ignore
+ @Test
+ public void testStamp_ZipXML() throws Exception {
+ SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
+ SuccessV1Response response = null;
+ byte[] zipData = Files.readAllBytes(Paths.get("src/test/resources/CFDI40/ZIP/120000conceptos.zip"));
+ response = (SuccessV1Response) api.StampZip(zipData, "v1");
+ System.out.println(response.Status);
+ System.out.println(response.HttpStatusCode);
+ System.out.println(response.tfd);
+ System.out.println(response.message);
+ String expect_status = "success";
+ Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
+ }
+
+ @Test
+ public void testStamp_ZipXML_NoSellado() throws Exception {
+ SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
+ SuccessV1Response response = null;
+ byte[] zipData = Files.readAllBytes(Paths.get("src/test/resources/CFDI40/ZIP/120000conceptosError.zip"));
+ response = (SuccessV1Response) api.StampZip(zipData, "v1");
+ System.out.println(response.Status);
+ System.out.println(response.HttpStatusCode);
+ System.out.println(response.tfd);
+ System.out.println(response.message);
+ if (response.message == "CFDI40102 - El resultado de la digestión debe ser igual al resultado de la desencripción del sello."){
+ String expect_status = "error";
+ Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
+ }
+
+ }
+
+ @Test
+ public void testStamp_ZipXML_FueraRango() throws Exception {
+ SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
+ SuccessV1Response response = null;
+ byte[] zipData = Files.readAllBytes(Paths.get("src/test/resources/CFDI40/ZIP/Mas120000conceptos.zip"));
+ response = (SuccessV1Response) api.StampZip(zipData, "v1");
+ System.out.println(response.Status);
+ System.out.println(response.HttpStatusCode);
+ System.out.println(response.tfd);
+ System.out.println(response.message);
+ if (response.message == "En este path sólo es posible timbrar facturas que tengan entre 110000 y 120000 nodos cfdi:Concepto por este path"){
+ String expect_status = "error";
+ Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
+ }
+ }
+
+ @Test
+ public void testStamp_ZipXML_EstructuraIncorrecta() throws Exception {
+ SWStampService api = new SWStampService(Utils.userSW, Utils.passwordSW, Utils.urlSW);
+ SuccessV1Response response = null;
+ byte[] zipData = Files.readAllBytes(Paths.get("src/test/resources/CFDI40/ZIP/120000conceptosEstructError.zip"));
+ response = (SuccessV1Response) api.StampZip(zipData, "v1");
+ System.out.println(response.Status);
+ System.out.println(response.HttpStatusCode);
+ System.out.println(response.tfd);
+ System.out.println(response.message);
+ if (response.message == "301 - La estructura del comprobante es incorrecta.") {
+ String expect_status = "error";
+ Assert.assertTrue(expect_status.equalsIgnoreCase(response.Status));
+ }
+ }
+}
diff --git a/src/test/java/Tests/Storage/SWStorageServiceTest.java b/src/test/java/Tests/Storage/SWStorageServiceTest.java
new file mode 100644
index 0000000..ecd3f32
--- /dev/null
+++ b/src/test/java/Tests/Storage/SWStorageServiceTest.java
@@ -0,0 +1,90 @@
+package Tests.Storage;
+import java.io.IOException;
+import java.util.UUID;
+import org.junit.Test;
+import Services.Storage.SWStorageService;
+import Tests.Utils;
+import Utils.Responses.Storage.StorageResponse;
+import org.junit.Assert;
+import org.junit.Rule;
+import org.junit.rules.TestName;
+import Exceptions.AuthException;
+import Exceptions.GeneralException;
+public class SWStorageServiceTest {
+ @Rule
+ public TestName testName = new TestName();
+ /**
+ * Método de UT con token.
+ */
+ @Test
+ public void testGetXmlToken_Success() throws AuthException, GeneralException, IOException {
+ SWStorageService storage = new SWStorageService(Utils.tokenSW, Utils.urlApiSW, null, 0);
+ StorageResponse res = (StorageResponse) storage
+ .getXml(UUID.fromString("4714f6f7-ccb4-4eb5-8ba6-3a523092e2b4"));
+ Assert.assertNotNull(res);
+ Assert.assertEquals(res.message, "success", res.Status);
+ Assert.assertNotNull(res.getData());
+ }
+ /**
+ * Método de UT con Authentication.
+ */
+ @Test
+ public void testGetXmlAuth_Success() throws AuthException, GeneralException, IOException {
+ SWStorageService storage = new SWStorageService(Utils.userSW, Utils.passwordSW, Utils.urlSW,
+ Utils.urlApiSW, null, 0);
+ StorageResponse res = (StorageResponse) storage
+ .getXml(UUID.fromString("4714f6f7-ccb4-4eb5-8ba6-3a523092e2b4"));
+ Assert.assertNotNull(res);
+ Assert.assertEquals(res.message, "success", res.Status);
+ // Assert.assertNotNull(res.getData());
+ // Assert.assertTrue(res.getData().getRecords().size() > 0);
+ }
+
+ /**
+ * Método de UT con token incorrecto.
+ */
+ @Test
+ public void testGetXmlToken_Error() throws AuthException, GeneralException, IOException {
+ SWStorageService storage = new SWStorageService("empty.token.sw", Utils.urlApiSW, null, 0);
+ StorageResponse res = (StorageResponse) storage
+ .getXml(UUID.fromString("c75f84db-e058-4a7c-a902-e4c9c871e8c1"));
+ Assert.assertNotNull(res);
+ Assert.assertTrue(res.Status.equals("error"));
+ Assert.assertTrue(!res.message.isEmpty());
+ }
+
+ /**
+ * Método de UT con Authentication incorrecta pero Uuid correcto.
+ */
+ @Test
+ public void testGetXmlAuthIncorrect_Error() {
+ try {
+ SWStorageService storage = new SWStorageService("user", "pass", Utils.urlSW, Utils.urlApiSW,
+ null, 0);
+ StorageResponse res = (StorageResponse) storage
+ .getXml(UUID.fromString("c75f84db-e058-4a7c-a902-e4b9c871e8c1"));
+ Assert.assertNotNull(res);
+ Assert.assertTrue(res.Status.equals("error"));
+ } catch (AuthException ex) {
+ Utils.showTestLog(testName, ex.getMessage());
+ } catch (GeneralException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Método de UT con uuid incorrecto.
+ */
+ @Test
+ public void testGetXmlUuid_Error() throws AuthException, GeneralException, IOException {
+ SWStorageService storage = new SWStorageService(Utils.tokenSW, Utils.urlApiSW, null, 0);
+ StorageResponse res = (StorageResponse) storage
+ .getXml(UUID.fromString("c75f84db-e058-4b7c-a902-e4b9c871e8c1"));
+ Assert.assertNotNull(res);
+ Assert.assertTrue(res.Status.equals("error"));
+ }
+}
diff --git a/src/test/java/Tests/Utils.java b/src/test/java/Tests/Utils.java
index 238c8d1..fbccbcb 100644
--- a/src/test/java/Tests/Utils.java
+++ b/src/test/java/Tests/Utils.java
@@ -17,45 +17,57 @@
import javax.xml.transform.dom.DOMSource;
import org.apache.commons.codec.binary.Base64;
import org.junit.rules.TestName;
-
import javax.xml.transform.stream.StreamResult;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
/**
-* Utils
-* Clase auxiliar de UT con datos comunes.
-* @author Eduardo Mares
-* @version 0.0.0.2
-* @since 2022-04-30
-*/
+ * Utils
+ * Clase auxiliar de UT con datos comunes.
+ *
+ * @author Eduardo Mares
+ * @version 0.0.0.2
+ * @since 2022-04-30
+ */
public class Utils {
public static String urlSW = "http://services.test.sw.com.mx";
public static String urlApiSW = "http://api.test.sw.com.mx";
public static String userSW = System.getenv("SDKTEST_USER");
public static String passwordSW = System.getenv("SDKTEST_PASSWORD");
public static String tokenSW = System.getenv("SDKTEST_TOKEN");
-
+ public static String cerb64 = loadResouceAsB64("src/test/resources/CertificadosDePrueba/CSD_EKU9003173C9.cer");
+ public static String keyb64 = loadResouceAsB64("src/test/resources/CertificadosDePrueba/CSD_EKU9003173C9.key");
+ public static String pfxb64 = loadResouceAsB64("src/test/resources/CertificadosDePrueba/EKU9003173C9.pfx");
+ public static String noCer = "30001000000500003416";
+ public static String passwordCsd = "12345678a";
+ public static String passwordPfx = "swpass";
+ public static String rfc = "EKU9003173C9";
+ public static String cancelacionXml = loadResourceAsString("src/test/resources/Extras/CancelacionXML.xml");
+ public static String aceptacionRechazoXml = loadResourceAsString("src/test/resources/Extras/AceptacionRechazo.xml");
+ public static String uuid = "fe4e71b0-8959-4fb9-8091-f5ac4fb0fef8";
+ public static String foliosustitucion = "0e4c30b8-11d8-40d8-894d-ef8b32eb4bdf";
+
/**
- * Genera un CFDI especifico y lo sella en caso de indicarse.
- * @param fileName
- * @param signed
- * @param version
- * @param isBase64
- * @return String
- */
- public String getCFDI(String fileName, boolean signed, String version, boolean isBase64){
-
+ * Genera un CFDI especifico y lo sella en caso de indicarse.
+ *
+ * @param fileName
+ * @param signed
+ * @param version
+ * @param isBase64
+ * @return String
+ */
+ public String getCFDI(String fileName, boolean signed, String version, boolean isBase64) {
+
String xml = "";
try {
xml = new String(Files.readAllBytes(Paths.get(fileName)), "UTF-8");
- } catch (IOException e) {
+ } catch (IOException e) {
e.printStackTrace();
}
-
+
String cfdi = changeDateAndSign(xml, signed, version);
- if(isBase64){
+ if (isBase64) {
try {
return encodeBase64(cfdi);
} catch (UnsupportedEncodingException e) {
@@ -65,22 +77,23 @@ public String getCFDI(String fileName, boolean signed, String version, boolean i
return cfdi;
}
-
+
/**
- * Genera un CFDI especifico.
- * @param fileName
- * @param isBase64
- * @return String
- */
- public String getJsonCFDI(String fileName, boolean isBase64) {
+ * Genera un CFDI especifico.
+ *
+ * @param fileName
+ * @param isBase64
+ * @return String
+ */
+ public String getJsonCFDI(String fileName, boolean isBase64) {
Gson gson = new Gson();
String xml = "";
try {
xml = new String(Files.readAllBytes(Paths.get(fileName)), "UTF-8");
- } catch (IOException e) {
+ } catch (IOException e) {
e.printStackTrace();
}
-
+
Map data = gson.fromJson(xml, Map.class);
if (data != null) {
UUID uuid = UUID.randomUUID();
@@ -88,8 +101,8 @@ public String getJsonCFDI(String fileName, boolean isBase64) {
data.put("Folio", randomUUIDString + "sdkjava");
data.put("Fecha", getDateCFDI());
}
-
- if(isBase64){
+
+ if (isBase64) {
try {
return encodeBase64(gson.toJson(data));
} catch (UnsupportedEncodingException e) {
@@ -101,11 +114,12 @@ public String getJsonCFDI(String fileName, boolean isBase64) {
}
/**
- * Genera un CFDI y lo sella en caso de indicarse.
- * @param xml
- * @param signed
- * @return String
- */
+ * Genera un CFDI único y lo sella en caso de indicarse.
+ *
+ * @param xml
+ * @param signed
+ * @return String
+ */
private String changeDateAndSign(String xml, boolean signed, String version) {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
@@ -119,6 +133,8 @@ private String changeDateAndSign(String xml, boolean signed, String version) {
Document doc = builder.parse(new InputSource(new StringReader(xml)));
doc.getDocumentElement().setAttribute("Fecha", getDateCFDI());
doc.getDocumentElement().setAttribute("Folio", randomUUIDString + "sdk-java");
+ doc.getDocumentElement().setAttribute("Certificado", cerb64);
+ doc.getDocumentElement().setAttribute("NoCertificado", noCer);
if (signed) {
Sign sign = new Sign();
String cadena = GenerateCadena(doc, version);
@@ -149,17 +165,24 @@ private String changeDateAndSign(String xml, boolean signed, String version) {
}
/**
- * Obtiene la fecha actual en formato necesario para CFDI.
- * @return String
- */
+ * Obtiene la fecha actual en formato necesario para CFDI.
+ *
+ * @return String
+ */
private String getDateCFDI() {
- SimpleDateFormat date = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
- date.setTimeZone(TimeZone.getTimeZone("America/Mexico_City"));
- return date.format(new Date());
+ Date date = new Date();
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(date);
+ calendar.add(Calendar.HOUR_OF_DAY, -1); // Restar una hora
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
+ sdf.setTimeZone(TimeZone.getTimeZone("America/Mexico_City"));
+ String realDate = sdf.format(calendar.getTime());
+ return realDate;
}
- private String GenerateCadena(Document xml, String version) throws TransformerConfigurationException, TransformerException, URISyntaxException {
-
+ private String GenerateCadena(Document xml, String version)
+ throws TransformerConfigurationException, TransformerException, URISyntaxException {
+
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = null;
transformer = transformerFactory.newTransformer();
@@ -172,63 +195,64 @@ private String GenerateCadena(Document xml, String version) throws TransformerCo
}
private String encodeBase64(String text) throws UnsupportedEncodingException {
- byte[] bytesEncoded = Base64.encodeBase64(text.getBytes("UTF-8"));
+ byte[] bytesEncoded = Base64.encodeBase64(text.getBytes("UTF-8"));
return new String(bytesEncoded);
}
- public String genComercioExterior(boolean isBase64){
- return getCFDI("src/test/resources/CFDI33/ComercioExterior11.xml", true, "3.3", isBase64);
+ public String genComercioExterior(boolean isBase64) {
+ return getCFDI("src/test/resources/CFDI40/ComercioExterior11/CFDI40_ComercioExterior.xml", true, "4.0",
+ isBase64);
}
- public String genComercioExteriorTimbrePrevio(boolean isBase64){
- return getCFDI("src/test/resources/CFDI33/ComercioExterior11TimbrePrevio.xml", true, "3.3", isBase64);
+ public String genComercioExteriorTimbrePrevio(boolean isBase64) {
+ return getCFDI("src/test/resources/Extras/ComercioExterior_Timbrado.xml", true, "4.0", isBase64);
}
- public String genPagos10(boolean isBase64){
- return getCFDI("src/test/resources/CFDI33/Pago10.xml", true, "3.3", isBase64);
+ public String genPagos20(boolean isBase64) {
+ return getCFDI("src/test/resources/CFDI40/Pagos20/CFDI40_Pago.xml", true, "4.0", isBase64);
}
- public String genPagos10TimbrePrevio(boolean isBase64){
- return getCFDI("src/test/resources/CFDI33/Pago10TimbrePrevio.xml", true, "3.3", isBase64);
+ public String genPagos20TimbrePrevio(boolean isBase64) {
+ return getCFDI("src/test/resources/Extras/Pagos20_Timbrado.xml", true, "4.0", isBase64);
}
-
- public String genNomina12(boolean isBase64){
- return getCFDI("src/test/resources/CFDI33/Nomina12.xml", true, "3.3", isBase64);
+
+ public String genNomina12(boolean isBase64) {
+ return getCFDI("src/test/resources/CFDI40/Nomina12/CFDI40_Nomina.xml", true, "4.0", isBase64);
}
- public String genNomina12TimbrePrevio(boolean isBase64){
- return getCFDI("src/test/resources/CFDI33/Nomina12TimbrePrevio.xml", true, "3.3", isBase64);
+ public String genNomina12TimbrePrevio(boolean isBase64) {
+ return getCFDI("src/test/resources/Extras/Nomina12_Timbrado.xml", true, "4.0", isBase64);
}
- public String StringgenBasico(boolean isBase64){
- return getCFDI("src/test/resources/CFDI33/CFDI33.xml", true, "3.3", isBase64);
+ public String StringgenBasico(boolean isBase64) {
+ return getCFDI("src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso.xml", true, "4.0", isBase64);
}
-
- public String StringgenBasicoTimbrePrevio(boolean isBase64){
- return getCFDI("src/test/resources/CFDI33/CFDI33TimbrePrevio.xml", true, "3.3", isBase64);
+
+ public String StringgenBasicoTimbrePrevio(boolean isBase64) {
+ return getCFDI("src/test/resources/Extras/CFDI40_Ingreso_Timbrado.xml", true, "4.0", isBase64);
}
-
+
public String JsonGenBasico(boolean isBase64) {
- return getJsonCFDI("src/test/resources/CFDI33/CFDI33.json", isBase64);
+ return getJsonCFDI("src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso.json", isBase64);
}
- public static boolean isValidB64(String value){
+ public static boolean isValidB64(String value) {
return Base64.isBase64(value.getBytes());
}
- public static String getCertificadoB64(){
+ public static String getCertificadoB64() {
byte[] fileContent;
try {
- fileContent = Files.readAllBytes(Paths.get("src/test/resources/CertificadosDePrueba/CSD_EKU9003173C9.key"));
+ fileContent = Files.readAllBytes(Paths.get("src/test/resources/CertificadosDePrueba/CSD_EKU9003173C9.cer"));
return new String(fileContent, "UTF-8");
} catch (IOException e) {
e.printStackTrace();
}
return "";
- }
+ }
- public static String getLlaveB64(){
+ public static String getLlaveB64() {
byte[] fileContent;
try {
fileContent = Files.readAllBytes(Paths.get("src/test/resources/CertificadosDePrueba/CSD_EKU9003173C9.key"));
@@ -237,10 +261,10 @@ public static String getLlaveB64(){
e.printStackTrace();
}
- return "";
+ return "";
}
- public String getResource(String fileName){
+ public String getResource(String fileName) {
byte[] fileContent;
try {
fileContent = Files.readAllBytes(Paths.get("src/test/resources/Extras/" + fileName));
@@ -249,10 +273,29 @@ public String getResource(String fileName){
e.printStackTrace();
}
- return "";
+ return "";
}
- public static void showTestLog(TestName testName, String status){
+
+ public static void showTestLog(TestName testName, String status) {
System.out.println(testName.getMethodName());
System.out.println(status + "\n");
}
+
+ private static String loadResouceAsB64(String path) {
+ try {
+ byte[] binaryData = Files.readAllBytes(Paths.get(path));
+ return java.util.Base64.getEncoder().encodeToString(binaryData);
+ } catch (IOException e) {
+ return "";
+ }
+ }
+
+ private static String loadResourceAsString(String path) {
+ try {
+ byte[] binaryData = Files.readAllBytes(Paths.get(path));
+ return new String(binaryData, "UTF-8").trim();
+ } catch (IOException e) {
+ return "";
+ }
+ }
}
diff --git a/src/test/resources/CFDI33/CFDI33.json b/src/test/resources/CFDI33/CFDI33.json
deleted file mode 100644
index 321dc9c..0000000
--- a/src/test/resources/CFDI33/CFDI33.json
+++ /dev/null
@@ -1,78 +0,0 @@
-{
- "Version": "3.3",
- "Serie": "A",
- "Folio": "123",
- "Fecha": "2020-07-15T01:44:33",
- "SubTotal": "5000.00",
- "Descuento": "0.00",
- "Moneda": "MXN",
- "Total": "5800.00",
- "TipoDeComprobante": "I",
- "MetodoPago": "PUE",
- "FormaPago": "01",
- "LugarExpedicion": "45400",
- "CfdiRelacionados": {
- "TipoRelacion": "04",
- "CfdiRelacionado": [{
- "UUID": "b80f3a35-512d-4781-90c0-faa2d845d38d"
- }
- ]
- },
- "Emisor": {
- "Rfc": "EKU9003173C9",
- "Nombre": "Nombre",
- "RegimenFiscal": "601"
- },
- "Receptor": {
- "Rfc": "EKU9003173C9",
- "Nombre": "Empleado",
- "UsoCFDI": "P01"
- },
- "Conceptos": [{
- "ClaveProdServ": "50211503",
- "Cantidad": 1.0,
- "ClaveUnidad": "H87",
- "Descripcion": "Cigarros á ´b & ü",
- "ValorUnitario": "5000.00",
- "Importe": "5000.00",
- "Descuento": "0.00",
- "Impuestos": {
- "Traslados": [{
- "Base": "5000.00",
- "Impuesto": "002",
- "TipoFactor": "Tasa",
- "TasaOCuota": "0.160000",
- "Importe": "800.00"
- }]
- },
- "InformacionAduanera": [{
- "NumeroPedimento": "19 02 1656 9123456"
- }, {
- "NumeroPedimento": "19 02 1656 9123456"
- }],
- "CuentaPredial": {
- "Numero": "1234657894236"
- },
- "Parte": [{
- "ClaveProdServ": "50211503",
- "NoIdentificacion": "X111",
- "Cantidad": 1.0,
- "Unidad": "Pieza",
- "Descripcion": "Parte 1",
- "ValorUnitario": "1.00",
- "Importe": "1.00",
- "InformacionAduanera": [{
- "NumeroPedimento": "19 16 1562 9123456"
- }]
- }]
- }],
- "Impuestos": {
- "TotalImpuestosTrasladados": "800.00",
- "Traslados": [{
- "Impuesto": "002",
- "TipoFactor": "Tasa",
- "TasaOCuota": "0.160000",
- "Importe": "800.00"
- }]
- }
-}
\ No newline at end of file
diff --git a/src/test/resources/CFDI33/CFDI33.xml b/src/test/resources/CFDI33/CFDI33.xml
deleted file mode 100644
index 6066d63..0000000
--- a/src/test/resources/CFDI33/CFDI33.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/test/resources/CFDI33/CFDI33TimbrePrevio.xml b/src/test/resources/CFDI33/CFDI33TimbrePrevio.xml
deleted file mode 100644
index 6fbe391..0000000
--- a/src/test/resources/CFDI33/CFDI33TimbrePrevio.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/test/resources/CFDI33/ComercioExterior11.xml b/src/test/resources/CFDI33/ComercioExterior11.xml
deleted file mode 100644
index 578d7ea..0000000
--- a/src/test/resources/CFDI33/ComercioExterior11.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/test/resources/CFDI33/ComercioExterior11TimbrePrevio.xml b/src/test/resources/CFDI33/ComercioExterior11TimbrePrevio.xml
deleted file mode 100644
index 862d9be..0000000
--- a/src/test/resources/CFDI33/ComercioExterior11TimbrePrevio.xml
+++ /dev/null
@@ -1,111 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/test/resources/CFDI33/Nomina12.xml b/src/test/resources/CFDI33/Nomina12.xml
deleted file mode 100644
index b63b59f..0000000
--- a/src/test/resources/CFDI33/Nomina12.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/test/resources/CFDI33/Nomina12TimbrePrevio.xml b/src/test/resources/CFDI33/Nomina12TimbrePrevio.xml
deleted file mode 100644
index 40dda1a..0000000
--- a/src/test/resources/CFDI33/Nomina12TimbrePrevio.xml
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/test/resources/CFDI33/Pago10.xml b/src/test/resources/CFDI33/Pago10.xml
deleted file mode 100644
index dff0caa..0000000
--- a/src/test/resources/CFDI33/Pago10.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/test/resources/CFDI33/Pago10TimbrePrevio.xml b/src/test/resources/CFDI33/Pago10TimbrePrevio.xml
deleted file mode 100644
index cc6540a..0000000
--- a/src/test/resources/CFDI33/Pago10TimbrePrevio.xml
+++ /dev/null
@@ -1,61 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/src/test/resources/CFDI40/Addenda/CFDI40_Addenda.xml b/src/test/resources/CFDI40/Addenda/CFDI40_Addenda.xml
index a83bb56..c8051f2 100644
--- a/src/test/resources/CFDI40/Addenda/CFDI40_Addenda.xml
+++ b/src/test/resources/CFDI40/Addenda/CFDI40_Addenda.xml
@@ -1,9 +1,9 @@
-
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" NoCertificado="30001000000500003416">
-
+
diff --git a/src/test/resources/CFDI40/CFDI40/CFDI40_Egreso_NotaDeCredito.json b/src/test/resources/CFDI40/CFDI40/CFDI40_Egreso_NotaDeCredito.json
index 03808ae..3f6a834 100644
--- a/src/test/resources/CFDI40/CFDI40/CFDI40_Egreso_NotaDeCredito.json
+++ b/src/test/resources/CFDI40/CFDI40/CFDI40_Egreso_NotaDeCredito.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "NC",
"Folio": "123456",
- "Fecha": "2022-01-25T00:00:00",
+ "Fecha": "2023-05-12T00:00:00",
"Sello": "",
"NoCertificado": "",
"Certificado": "",
@@ -35,7 +35,7 @@
"Receptor": {
"Rfc": "EKU9003173C9",
"Nombre": "ESCUELA KEMPER URGATE",
- "DomicilioFiscalReceptor": "26015",
+ "DomicilioFiscalReceptor": "42501",
"RegimenFiscalReceptor": "601",
"UsoCFDI": "CP01"
},
diff --git a/src/test/resources/CFDI40/CFDI40/CFDI40_Egreso_NotaDeCredito.xml b/src/test/resources/CFDI40/CFDI40/CFDI40_Egreso_NotaDeCredito.xml
index fcaf3a1..a97663a 100644
--- a/src/test/resources/CFDI40/CFDI40/CFDI40_Egreso_NotaDeCredito.xml
+++ b/src/test/resources/CFDI40/CFDI40/CFDI40_Egreso_NotaDeCredito.xml
@@ -1,10 +1,12 @@
-
+
-
+
@@ -19,4 +21,4 @@
-
\ No newline at end of file
+
diff --git a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso.json b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso.json
index 59ec088..3275b7c 100644
--- a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso.json
+++ b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "SW",
"Folio": "123456",
- "Fecha": "2022-01-12T00:00:00",
+ "Fecha": "2023-05-12T00:00:00",
"Sello": "",
"NoCertificado": "",
"Certificado": "",
@@ -25,7 +25,7 @@
"Receptor": {
"Rfc": "EKU9003173C9",
"Nombre": "ESCUELA KEMPER URGATE",
- "DomicilioFiscalReceptor": "26015",
+ "DomicilioFiscalReceptor": "42501",
"RegimenFiscalReceptor": "601",
"UsoCFDI": "CP01"
},
diff --git a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso.xml b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso.xml
index 4d78757..a390bec 100644
--- a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso.xml
+++ b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso.xml
@@ -1,10 +1,10 @@
-
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-
+
-
\ No newline at end of file
+
diff --git a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_ACuentaTerceros.json b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_ACuentaTerceros.json
index cbdb214..f491803 100644
--- a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_ACuentaTerceros.json
+++ b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_ACuentaTerceros.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "SW",
"Folio": "123456",
- "Fecha": "2022-02-21T00:00:02",
+ "Fecha": "2023-05-12T00:00:02",
"Sello": "",
"NoCertificado": "",
"Certificado": "",
@@ -25,7 +25,7 @@
"Receptor": {
"Rfc": "URE180429TM6",
"Nombre": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
- "DomicilioFiscalReceptor": "65000",
+ "DomicilioFiscalReceptor": "86991",
"RegimenFiscalReceptor": "601",
"UsoCFDI": "CP01"
},
@@ -56,7 +56,7 @@
"RfcACuentaTerceros": "CACX7605101P8",
"NombreACuentaTerceros": "XOCHILT CASAS CHAVEZ",
"RegimenFiscalACuentaTerceros": "601",
- "DomicilioFiscalACuentaTerceros": "10740"
+ "DomicilioFiscalACuentaTerceros": "36257"
}
}
],
diff --git a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_ACuentaTerceros.xml b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_ACuentaTerceros.xml
index 8e4c3c1..71ad208 100644
--- a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_ACuentaTerceros.xml
+++ b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_ACuentaTerceros.xml
@@ -1,9 +1,9 @@
-
-
+
@@ -11,7 +11,7 @@
-
+
diff --git a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_Global.json b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_Global.json
index f1d50bb..12d2936 100644
--- a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_Global.json
+++ b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_Global.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "Serie",
"Folio": "2080427802",
- "Fecha": "2022-04-10T18:31:50",
+ "Fecha": "2023-05-12T00:31:50",
"Sello": "",
"FormaPago": "99",
"FormaPagoSpecified": true,
@@ -22,7 +22,7 @@
"InformacionGlobal": {
"Periodicidad": "01",
"Meses": "01",
- "Año": "2021"
+ "Año": "2022"
},
"Emisor": {
"Rfc": "EKU9003173C9",
diff --git a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_Global.xml b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_Global.xml
index 8920684..9fcf697 100644
--- a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_Global.xml
+++ b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_Global.xml
@@ -1,8 +1,8 @@
-
-
+
diff --git a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_GlobalExtranjero.json b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_GlobalExtranjero.json
index e2ef841..1f3ac85 100644
--- a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_GlobalExtranjero.json
+++ b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_GlobalExtranjero.json
@@ -1,7 +1,7 @@
{
"Version": "4.0",
"Folio": "271",
- "Fecha": "2022-04-11T00:33:58",
+ "Fecha": "2023-05-12T00:33:58",
"Sello": "",
"FormaPago": "01",
"FormaPagoSpecified": true,
@@ -40,7 +40,7 @@
"Base": 50,
"Impuesto": "002",
"TipoFactor": "Tasa",
- "TasaOCuota": 0.16,
+ "TasaOCuota": "0.160000",
"TasaOCuotaSpecified": true,
"Importe": 8,
"ImporteSpecified": true
@@ -65,7 +65,7 @@
"Base": 250,
"Impuesto": "002",
"TipoFactor": "Tasa",
- "TasaOCuota": 0,
+ "TasaOCuota": "0.000000",
"TasaOCuotaSpecified": true,
"Importe": 0,
"ImporteSpecified": true
@@ -89,7 +89,7 @@
"Base": 10,
"Impuesto": "002",
"TipoFactor": "Tasa",
- "TasaOCuota": 0.16,
+ "TasaOCuota": "0.160000",
"TasaOCuotaSpecified": true,
"Importe": 1.6,
"ImporteSpecified": true
@@ -124,7 +124,7 @@
"Base": 55.55,
"Impuesto": "002",
"TipoFactor": "Tasa",
- "TasaOCuota": 0.16,
+ "TasaOCuota": "0.160000",
"TasaOCuotaSpecified": true,
"Importe": 8.89,
"ImporteSpecified": true
@@ -168,7 +168,7 @@
"Base": 58.25,
"Impuesto": "002",
"TipoFactor": "Tasa",
- "TasaOCuota": 0.16,
+ "TasaOCuota": "0.160000",
"TasaOCuotaSpecified": true,
"Importe": 9.32,
"ImporteSpecified": true
@@ -193,7 +193,7 @@
"Base": 173.8,
"Impuesto": "002",
"TipoFactor": "Tasa",
- "TasaOCuota": 0.16,
+ "TasaOCuota": "0.160000",
"Importe": 27.81,
"TasaOCuotaSpecified": true,
"ImporteSpecified": true
@@ -202,7 +202,7 @@
"Base": 250,
"Impuesto": "002",
"TipoFactor": "Tasa",
- "TasaOCuota": 0,
+ "TasaOCuota": "0.000000",
"Importe": 0,
"TasaOCuotaSpecified": true,
"ImporteSpecified": true
@@ -210,14 +210,10 @@
{
"Base": 98.99,
"Impuesto": "002",
- "TipoFactor": "Exento",
- "TasaOCuota": 0,
- "Importe": 0,
- "TasaOCuotaSpecified": true,
- "ImporteSpecified": true
+ "TipoFactor": "Exento"
}
],
"TotalImpuestosTrasladados": 27.81,
"TotalImpuestosTrasladadosSpecified": true
}
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_GlobalExtranjero.xml b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_GlobalExtranjero.xml
index 4ab8e68..0f1eb50 100644
--- a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_GlobalExtranjero.xml
+++ b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_GlobalExtranjero.xml
@@ -53,7 +53,7 @@
-
+
\ No newline at end of file
diff --git a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_KitParte.json b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_KitParte.json
index 720f269..eabd711 100644
--- a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_KitParte.json
+++ b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_KitParte.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "SW",
"Folio": "123456",
- "Fecha": "2022-03-29T00:00:00",
+ "Fecha": "2023-05-12T00:00:00",
"Sello": "",
"NoCertificado": "",
"Certificado": "",
@@ -35,7 +35,7 @@
"Receptor": {
"Rfc": "CACX7605101P8",
"Nombre": "XOCHILT CASAS CHAVEZ",
- "DomicilioFiscalReceptor": "10740",
+ "DomicilioFiscalReceptor": "36257",
"RegimenFiscalReceptor": "612",
"UsoCFDI": "CP01"
},
diff --git a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_KitParte.xml b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_KitParte.xml
index ef00c55..7e5004d 100644
--- a/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_KitParte.xml
+++ b/src/test/resources/CFDI40/CFDI40/CFDI40_Ingreso_KitParte.xml
@@ -1,9 +1,9 @@
-
-
+
diff --git a/src/test/resources/CFDI40/CFDI40/CFDI40_Traslado.json b/src/test/resources/CFDI40/CFDI40/CFDI40_Traslado.json
index 5d5eab1..a02c68a 100644
--- a/src/test/resources/CFDI40/CFDI40/CFDI40_Traslado.json
+++ b/src/test/resources/CFDI40/CFDI40/CFDI40_Traslado.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "SW",
"Folio": "123456",
- "Fecha": "2022-01-12T00:00:00",
+ "Fecha": "2023-05-12T00:00:00",
"Sello": "",
"NoCertificado": "",
"Certificado": "",
@@ -21,7 +21,7 @@
"Receptor": {
"Rfc": "EKU9003173C9",
"Nombre": "ESCUELA KEMPER URGATE",
- "DomicilioFiscalReceptor": "26015",
+ "DomicilioFiscalReceptor": "42501",
"RegimenFiscalReceptor": "601",
"UsoCFDI": "CP01"
},
diff --git a/src/test/resources/CFDI40/CFDI40/CFDI40_Traslado.xml b/src/test/resources/CFDI40/CFDI40/CFDI40_Traslado.xml
index 1c89322..8b5328d 100644
--- a/src/test/resources/CFDI40/CFDI40/CFDI40_Traslado.xml
+++ b/src/test/resources/CFDI40/CFDI40/CFDI40_Traslado.xml
@@ -1,9 +1,9 @@
-
-
+
diff --git a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_Autotransporte.json b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_Autotransporte.json
index 993c317..d2e6c80 100644
--- a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_Autotransporte.json
+++ b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_Autotransporte.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "CFDI",
"Folio": "Folio",
- "Fecha": "2022-04-06T00:18:00",
+ "Fecha": "2023-09-19T01:01:01",
"Sello": "e",
"FormaPago": "03",
"FormaPagoSpecified": true,
@@ -30,7 +30,7 @@
"Receptor": {
"Rfc": "URE180429TM6",
"Nombre": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
- "DomicilioFiscalReceptor": "65000",
+ "DomicilioFiscalReceptor": "86991",
"RegimenFiscalReceptor": "601",
"UsoCFDI": "G01"
},
@@ -42,7 +42,7 @@
"Base": 26232.75,
"Impuesto": "002",
"TipoFactor": "Tasa",
- "TasaOCuota": 0.16,
+ "TasaOCuota": "0.160000",
"TasaOCuotaSpecified": true,
"Importe": 4197.24,
"ImporteSpecified": true
@@ -53,7 +53,7 @@
"Base": 26232.75,
"Impuesto": "002",
"TipoFactor": "Tasa",
- "TasaOCuota": 0.04,
+ "TasaOCuota": "0.040000",
"TasaOCuotaSpecified": true,
"Importe": 1049.31,
"ImporteSpecified": true
@@ -79,7 +79,7 @@
"Base": 26232.75,
"Impuesto": "002",
"TipoFactor": "Tasa",
- "TasaOCuota": 0.16,
+ "TasaOCuota": "0.160000",
"Importe": 4197.24,
"TasaOCuotaSpecified": true,
"ImporteSpecified": true
diff --git a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_Autotransporte.xml b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_Autotransporte.xml
index 03f2068..510627d 100644
--- a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_Autotransporte.xml
+++ b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_Autotransporte.xml
@@ -1,7 +1,10 @@
-
+
-
+
@@ -30,10 +33,10 @@
-
+
-
+
@@ -57,4 +60,4 @@
-
\ No newline at end of file
+
diff --git a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_TransporteAereo.xml b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_TransporteAereo.xml
index 8048c14..98e670c 100644
--- a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_TransporteAereo.xml
+++ b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_TransporteAereo.xml
@@ -1,53 +1,55 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
-
-
+
+
-
\ No newline at end of file
+
diff --git a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_TransporteFerroviario.json b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_TransporteFerroviario.json
index 7ddb8de..751a270 100644
--- a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_TransporteFerroviario.json
+++ b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_TransporteFerroviario.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "Serie",
"Folio": "Folio",
- "Fecha": "2022-04-06T00:18:00",
+ "Fecha": "2023-05-12T00:18:00",
"Sello": "e",
"FormaPago": "99",
"FormaPagoSpecified": true,
@@ -30,7 +30,7 @@
"Receptor": {
"Rfc": "URE180429TM6",
"Nombre": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
- "DomicilioFiscalReceptor": "65000",
+ "DomicilioFiscalReceptor": "86991",
"RegimenFiscalReceptor": "601",
"UsoCFDI": "G01"
},
@@ -42,7 +42,7 @@
"Base": 1,
"Impuesto": "002",
"TipoFactor": "Tasa",
- "TasaOCuota": 0.16,
+ "TasaOCuota": "0.160000",
"TasaOCuotaSpecified": true,
"Importe": 0.16,
"ImporteSpecified": true
@@ -67,7 +67,7 @@
"Base": 1,
"Impuesto": "002",
"TipoFactor": "Tasa",
- "TasaOCuota": 0.16,
+ "TasaOCuota": "0.160000",
"Importe": 0.16,
"TasaOCuotaSpecified": true,
"ImporteSpecified": true
@@ -284,7 +284,7 @@
"Contenedor": [
{
"PesoContenedorVacio": "1",
- "PesoNetoMercancia": "1",
+ "PesoNetoMercancia": "1000",
"TipoContenedor": "TC02"
}
]
@@ -320,4 +320,4 @@
}
]
}
-}
\ No newline at end of file
+}
diff --git a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_TransporteFerroviario.xml b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_TransporteFerroviario.xml
index cc1e5ce..0110180 100644
--- a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_TransporteFerroviario.xml
+++ b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_TransporteFerroviario.xml
@@ -1,70 +1,72 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
-
-
+
+
-
\ No newline at end of file
+
diff --git a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_TransporteMaritimo.xml b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_TransporteMaritimo.xml
index f7291cb..4948fb7 100644
--- a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_TransporteMaritimo.xml
+++ b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Ingreso_CartaPorte_TransporteMaritimo.xml
@@ -1,10 +1,10 @@
-
+
@@ -31,28 +31,27 @@
-
+
-
+
-
-
+
+
-
+
-
-
-
+
+
-
\ No newline at end of file
+
diff --git a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_Autotransporte.json b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_Autotransporte.json
index 4b3f978..d3a1e6a 100644
--- a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_Autotransporte.json
+++ b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_Autotransporte.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "CFDI",
"Folio": 78,
- "Fecha": "2022-03-08T13:24:30",
+ "Fecha": "2023-09-19T03:24:30",
"Moneda": "XXX",
"TipoDeComprobante": "T",
"LugarExpedicion": "25350",
@@ -17,7 +17,7 @@
"Receptor": {
"Rfc": "EKU9003173C9",
"Nombre": "ESCUELA KEMPER URGATE",
- "DomicilioFiscalReceptor": "26015",
+ "DomicilioFiscalReceptor": "42501",
"RegimenFiscalReceptor": "601",
"UsoCFDI": "S01"
},
@@ -34,7 +34,7 @@
"Importe": "26232.75",
"ObjetoImp": "01"
}
- ],
+ ],
"Complemento": {
"Any": [
{
diff --git a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_Autotransporte.xml b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_Autotransporte.xml
index f1e0749..4948fb7 100644
--- a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_Autotransporte.xml
+++ b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_Autotransporte.xml
@@ -1,38 +1,57 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
-
\ No newline at end of file
+
diff --git a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_TransporteAereo.xml b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_TransporteAereo.xml
index 8962f17..a7f5b96 100644
--- a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_TransporteAereo.xml
+++ b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_TransporteAereo.xml
@@ -1,10 +1,10 @@
-
-
+
@@ -32,4 +32,4 @@
-
\ No newline at end of file
+
diff --git a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_TransporteFerroviario.xml b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_TransporteFerroviario.xml
index 665cff2..f9fbcb0 100644
--- a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_TransporteFerroviario.xml
+++ b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_TransporteFerroviario.xml
@@ -1,10 +1,10 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" NoCertificado="30001000000500003416" Certificado="MIIFsDCCA5igAwIBAgIUMzAwM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Hw1qdRE5xmTZ7AGG0UHs+unkGjpCVeJ+BEBn0JPLWVvDKHZAQMj6s5Bku35+d/MyATkpOPsGT/VTnsouxekDfikJD1f7A1ZpJbqDpkJnss3vQIDAQABox0wGzAMBgNVHRMBAf8EAjAAMAsGA1UdDwQEAwIGwDANBgkqhkiG9w0BAQsFAAOCAgEAFaUgj5PqgvJigNMgtrdXZnbPfVBbukAbW4OGnUhNrA7SRAAfv2BSGk16PI0nBOr7qF2mItmBnjgEwk+DTv8Zr7w5qp7vleC6dIsZFNJoa6ZndrE/f7KO1CYruLXr5gwEkIyGfJ9NwyIagvHHMszzyHiSZIA850fWtbqtythpAliJ2jF35M5pNS+YTkRB+T6L/c6m00ymN3q9lT1rB03YywxrLreRSFZOSrbwWfg34EJbHfbFXpCSVYdJRfiVdvHnewN0r5fUlPtR9stQHyuqewzdkyb5jTTw02D2cUfL57vlPStBj7SEi3uOWvLrsiDnnCIxRMYJ2UA2ktDKHk+zWnsDmaeleSzonv2CHW42yXYPCvWi88oE1DJNYLNkIjua7MxAnkNZbScNw01A6zbLsZ3y8G6eEYnxSTRfwjd8EP4kdiHNJftm7Z4iRU7HOVh79/lRWB+gd171s3d/mI9kte3MRy6V8MMEMCAnMboGpaooYwgAmwclI2XZCczNWXfhaWe0ZS5PmytD/GDpXzkX0oEgY9K/uYo5V77NdZbGAjmyi8cE2B2ogvyaN2XfIInrZPgEffJ4AB7kFA2mwesdLOCh0BLD9itmCve3A1FGR4+stO2ANUoiI3w3Tv2yQSg4bjeDlJ08lXaaFCLW2peEXMXjQUk7fmpb5MNuOUTW6BE=">
-
+
@@ -38,4 +38,4 @@
-
\ No newline at end of file
+
diff --git a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_TransporteMaritimo.xml b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_TransporteMaritimo.xml
index d69c34a..a4786e7 100644
--- a/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_TransporteMaritimo.xml
+++ b/src/test/resources/CFDI40/CartaPorte20/CFDI40_Traslado_CartaPorte_TransporteMaritimo.xml
@@ -1,10 +1,10 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" NoCertificado="30001000000500003416" Certificado="MIIFsDCCA5igAwIBAgIUMzAwMDEwMDAwMDA1MDAwMDM0MTYwDQYJKoZIhvcNAQELBQAwggErMQ8wDQYDVQQDDAZBQyBVQVQxLjAsBgNVBAoMJVNFUlZJQ0lPIERFIEFETUlOSVNUUkFDSU9OIFRSSUJVVEFSSUExGjAYBgNVBAsMEVNBVC1JRVMgQXV0aG9yaXR5MSgwJgYJKoZIhvcNAQkBFhlvc2Nhci5tYXJ0aW5lekBzYXQuZ29iLm14MR0wGwYDVQQJDBQzcmEgY2VycmFkYSBkZSBjYWxpejEOMAwGA1UEEQwFMDYzNzAxCzAJBgNVBAYTAk1YMRkwFwYDVQQIDBBDSVVEQUQgREUgTUVYSUNPMREwDwYDVQQHDAhDT1lPQUNBTjERMA8GA1UELRMIMi41LjQuNDUxJTAjBgkqhkiG9w0BCQITFnJlc3BvbnNhYmxlOiBBQ0RNQS1TQVQwHhcNMjMwNTE4MTE0MzUxWhcNMjcwNTE4MTE0MzUxWjCB1zEnMCUGA1UEAxMeRVNDVUVMQSBLRU1QRVIgVVJHQVRFIFNBIERFIENWMScwJQYDVQQpEx5FU0NVRUxBIEtFTVBFUiBVUkdBVEUgU0EgREUgQ1YxJzAlBgNVBAoTHkVTQ1VFTEEgS0VNUEVSIFVSR0FURSBTQSBERSBDVjElMCMGA1UELRMcRUtVOTAwMzE3M0M5IC8gVkFEQTgwMDkyN0RKMzEeMBwGA1UEBRMVIC8gVkFEQTgwMDkyN0hTUlNSTDA1MRMwEQYDVQQLEwpTdWN1cnNhbCAxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtmecO6n2GS0zL025gbHGQVxznPDICoXzR2uUngz4DqxVUC/w9cE6FxSiXm2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git a/src/test/resources/CFDI40/ComercioExterior11/CFDI40_ComercioExterior.json b/src/test/resources/CFDI40/ComercioExterior11/CFDI40_ComercioExterior.json
index 3f29bdb..23b3234 100644
--- a/src/test/resources/CFDI40/ComercioExterior11/CFDI40_ComercioExterior.json
+++ b/src/test/resources/CFDI40/ComercioExterior11/CFDI40_ComercioExterior.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "SW",
"Folio": "123456",
- "Fecha": "2022-02-14T00:00:00",
+ "Fecha": "2023-05-12T00:00:00",
"Sello": "",
"NoCertificado": "",
"Certificado": "",
@@ -14,6 +14,7 @@
"Total": "399.16",
"TipoDeComprobante": "I",
"Exportacion": "02",
+ "MetodoPago": "PPD",
"FormaPago": "99",
"LugarExpedicion": "45610",
"Emisor": {
@@ -24,7 +25,7 @@
"Receptor": {
"Rfc": "EKU9003173C9",
"Nombre": "ESCUELA KEMPER URGATE",
- "DomicilioFiscalReceptor": "26015",
+ "DomicilioFiscalReceptor": "42501",
"RegimenFiscalReceptor": "601",
"UsoCFDI": "CP01"
},
@@ -91,7 +92,7 @@
"CertificadoOrigen": "0",
"Incoterm": "FOB",
"Subdivision": "0",
- "TipoCambioUSD": "19.7933",
+ "TipoCambioUSD": "17.5845",
"TotalUSD": "25.56",
"Emisor": {
"Domicilio": {
diff --git a/src/test/resources/CFDI40/ComercioExterior11/CFDI40_ComercioExterior.xml b/src/test/resources/CFDI40/ComercioExterior11/CFDI40_ComercioExterior.xml
index d41c9cd..c904eff 100644
--- a/src/test/resources/CFDI40/ComercioExterior11/CFDI40_ComercioExterior.xml
+++ b/src/test/resources/CFDI40/ComercioExterior11/CFDI40_ComercioExterior.xml
@@ -1,9 +1,9 @@
-
-
+
@@ -11,23 +11,23 @@
-
-
+
+
-
+
-
-
+
+
-
+
diff --git a/src/test/resources/CFDI40/ComercioExterior11/CFDI40_ComercioExterior_DiferentesMonedas.json b/src/test/resources/CFDI40/ComercioExterior11/CFDI40_ComercioExterior_DiferentesMonedas.json
index 54575e6..6a666d3 100644
--- a/src/test/resources/CFDI40/ComercioExterior11/CFDI40_ComercioExterior_DiferentesMonedas.json
+++ b/src/test/resources/CFDI40/ComercioExterior11/CFDI40_ComercioExterior_DiferentesMonedas.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "Serie",
"Folio": "Folio",
- "Fecha": "2022-05-27T00:00:10",
+ "Fecha": "2023-05-12T00:00:10",
"Sello": "",
"FormaPago": "99",
"FormaPagoSpecified": true,
@@ -11,7 +11,7 @@
"CondicionesDePago": "CondicionesDePago",
"SubTotal": "1230",
"Moneda": "EUR",
- "TipoCambio": "21.77",
+ "TipoCambio": "19.3245",
"TipoCambioSpecified": true,
"Total": "1230",
"TipoDeComprobante": "I",
@@ -27,7 +27,7 @@
"Receptor": {
"Rfc": "URE180429TM6",
"Nombre": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
- "DomicilioFiscalReceptor": "65000",
+ "DomicilioFiscalReceptor": "86991",
"RegimenFiscalReceptor": "601",
"UsoCFDI": "G01"
},
@@ -39,7 +39,7 @@
"Base": "1230",
"Impuesto": "002",
"TipoFactor": "Tasa",
- "TasaOCuota": "0",
+ "TasaOCuota": "0.000000",
"TasaOCuotaSpecified": true,
"Importe": "0",
"ImporteSpecified": true
@@ -63,7 +63,7 @@
"Base": "1230",
"Impuesto": "002",
"TipoFactor": "Tasa",
- "TasaOCuota": "0",
+ "TasaOCuota": "0.000000",
"Importe": "0",
"TasaOCuotaSpecified": true,
"ImporteSpecified": true
@@ -82,7 +82,7 @@
"CertificadoOrigen": "0",
"Incoterm": "FOB",
"Subdivision": "0",
- "TipoCambioUSD": "19.7933",
+ "TipoCambioUSD": "17.5845",
"TotalUSD": "1351.63",
"Emisor": {
"Domicilio": {
diff --git a/src/test/resources/CFDI40/ComercioExterior11/CFDI40_ComercioExterior_DiferentesMonedas.xml b/src/test/resources/CFDI40/ComercioExterior11/CFDI40_ComercioExterior_DiferentesMonedas.xml
index 55589c9..30b53c4 100644
--- a/src/test/resources/CFDI40/ComercioExterior11/CFDI40_ComercioExterior_DiferentesMonedas.xml
+++ b/src/test/resources/CFDI40/ComercioExterior11/CFDI40_ComercioExterior_DiferentesMonedas.xml
@@ -1,8 +1,8 @@
-
-
+
@@ -18,7 +18,7 @@
-
+
diff --git a/src/test/resources/CFDI40/Detallista131/CFDI40_Detallista.json b/src/test/resources/CFDI40/Detallista131/CFDI40_Detallista.json
index 4e24c34..4e1179c 100644
--- a/src/test/resources/CFDI40/Detallista131/CFDI40_Detallista.json
+++ b/src/test/resources/CFDI40/Detallista131/CFDI40_Detallista.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "Serie",
"Folio": "Folio",
- "Fecha": "2022-04-11T00:18:00",
+ "Fecha": "2023-05-12T00:18:00",
"Sello": "",
"FormaPago": "99",
"FormaPagoSpecified": true,
@@ -29,7 +29,7 @@
"Receptor": {
"Rfc": "URE180429TM6",
"Nombre": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
- "DomicilioFiscalReceptor": "65000",
+ "DomicilioFiscalReceptor": "86991",
"ResidenciaFiscalSpecified": false,
"RegimenFiscalReceptor": "601",
"UsoCFDI": "G01"
@@ -42,7 +42,7 @@
"Base": "1",
"Impuesto": "002",
"TipoFactor": "Tasa",
- "TasaOCuota": "0.16",
+ "TasaOCuota": "0.160000",
"TasaOCuotaSpecified": true,
"Importe": "0.16",
"ImporteSpecified": true
@@ -53,7 +53,7 @@
"Base": "1",
"Impuesto": "001",
"TipoFactor": "Tasa",
- "TasaOCuota": "0.1",
+ "TasaOCuota": "0.100000",
"Importe": "0"
},
{
@@ -93,7 +93,7 @@
"Base": "1",
"Impuesto": "002",
"TipoFactor": "Tasa",
- "TasaOCuota": "0.16",
+ "TasaOCuota": "0.160000",
"Importe": "0.16",
"TasaOCuotaSpecified": true,
"ImporteSpecified": true
diff --git a/src/test/resources/CFDI40/Detallista131/CFDI40_Detallista.xml b/src/test/resources/CFDI40/Detallista131/CFDI40_Detallista.xml
index 100ce3d..53b00fe 100644
--- a/src/test/resources/CFDI40/Detallista131/CFDI40_Detallista.xml
+++ b/src/test/resources/CFDI40/Detallista131/CFDI40_Detallista.xml
@@ -1,10 +1,10 @@
-
+
@@ -56,4 +56,4 @@
-
+
\ No newline at end of file
diff --git a/src/test/resources/CFDI40/Donatarias11/CFDI40_Donatarias.xml b/src/test/resources/CFDI40/Donatarias11/CFDI40_Donatarias.xml
index 01a41d5..ea10a10 100644
--- a/src/test/resources/CFDI40/Donatarias11/CFDI40_Donatarias.xml
+++ b/src/test/resources/CFDI40/Donatarias11/CFDI40_Donatarias.xml
@@ -1,10 +1,10 @@
-
+
@@ -22,5 +22,4 @@
-
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/test/resources/CFDI40/INE11/CFDI40_INE.json b/src/test/resources/CFDI40/INE11/CFDI40_INE.json
index 1794116..13b23f1 100644
--- a/src/test/resources/CFDI40/INE11/CFDI40_INE.json
+++ b/src/test/resources/CFDI40/INE11/CFDI40_INE.json
@@ -1,6 +1,6 @@
{
"Version": "4.0",
- "Fecha": "2022-03-10T09:57:43",
+ "Fecha": "2023-05-12T09:57:43",
"Serie": "Cava tequilera",
"Folio": 79,
"FormaPago": "01",
@@ -25,7 +25,7 @@
"Rfc": "URE180429TM6",
"Nombre": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
"UsoCFDI": "G03",
- "DomicilioFiscalReceptor": "65000",
+ "DomicilioFiscalReceptor": "86991",
"RegimenFiscalReceptor": "601"
},
"Conceptos": [
diff --git a/src/test/resources/CFDI40/INE11/CFDI40_INE.xml b/src/test/resources/CFDI40/INE11/CFDI40_INE.xml
index 8b5fe95..0f0b119 100644
--- a/src/test/resources/CFDI40/INE11/CFDI40_INE.xml
+++ b/src/test/resources/CFDI40/INE11/CFDI40_INE.xml
@@ -1,7 +1,7 @@
-
+
-
+
diff --git a/src/test/resources/CFDI40/InstitucionesEducativasPrivadas10/CFDI40_Instituciones_Educativas_Privadas.json b/src/test/resources/CFDI40/InstitucionesEducativasPrivadas10/CFDI40_Instituciones_Educativas_Privadas.json
index a9f40cd..d8a3574 100644
--- a/src/test/resources/CFDI40/InstitucionesEducativasPrivadas10/CFDI40_Instituciones_Educativas_Privadas.json
+++ b/src/test/resources/CFDI40/InstitucionesEducativasPrivadas10/CFDI40_Instituciones_Educativas_Privadas.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "1230978ACB",
"Folio": "26480",
- "Fecha": "2022-04-11T00:00:00",
+ "Fecha": "2023-05-12T00:00:00",
"FormaPago": "01",
"FormaPagoSpecified": true,
"SubTotal": "1",
@@ -21,7 +21,7 @@
"Receptor": {
"Rfc": "CACX7605101P8",
"Nombre": "XOCHILT CASAS CHAVEZ",
- "DomicilioFiscalReceptor": "10740",
+ "DomicilioFiscalReceptor": "36257",
"RegimenFiscalReceptor": "612",
"UsoCFDI": "G03"
},
diff --git a/src/test/resources/CFDI40/InstitucionesEducativasPrivadas10/CFDI40_Instituciones_Educativas_Privadas.xml b/src/test/resources/CFDI40/InstitucionesEducativasPrivadas10/CFDI40_Instituciones_Educativas_Privadas.xml
index 32aa85e..c68e71b 100644
--- a/src/test/resources/CFDI40/InstitucionesEducativasPrivadas10/CFDI40_Instituciones_Educativas_Privadas.xml
+++ b/src/test/resources/CFDI40/InstitucionesEducativasPrivadas10/CFDI40_Instituciones_Educativas_Privadas.xml
@@ -1,7 +1,7 @@
-
+
-
+
diff --git a/src/test/resources/CFDI40/LeyendasFiscales11/CFDI40_LeyendasFiscales.json b/src/test/resources/CFDI40/LeyendasFiscales11/CFDI40_LeyendasFiscales.json
index 38d4835..bf622a4 100644
--- a/src/test/resources/CFDI40/LeyendasFiscales11/CFDI40_LeyendasFiscales.json
+++ b/src/test/resources/CFDI40/LeyendasFiscales11/CFDI40_LeyendasFiscales.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "FNCS",
"Folio": "005575",
- "Fecha": "2022-04-04T01:16:48",
+ "Fecha": "2023-05-12T01:16:48",
"Sello": "",
"NoCertificado": "",
"Certificado": "",
@@ -22,7 +22,7 @@
"Receptor": {
"Rfc": "EKU9003173C9",
"Nombre": "ESCUELA KEMPER URGATE",
- "DomicilioFiscalReceptor": "26015",
+ "DomicilioFiscalReceptor": "42501",
"RegimenFiscalReceptor": "601",
"UsoCFDI": "CP01"
},
diff --git a/src/test/resources/CFDI40/LeyendasFiscales11/CFDI40_LeyendasFiscales.xml b/src/test/resources/CFDI40/LeyendasFiscales11/CFDI40_LeyendasFiscales.xml
index b0a09ed..00e2666 100644
--- a/src/test/resources/CFDI40/LeyendasFiscales11/CFDI40_LeyendasFiscales.xml
+++ b/src/test/resources/CFDI40/LeyendasFiscales11/CFDI40_LeyendasFiscales.xml
@@ -1,10 +1,10 @@
-
+
diff --git a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina.json b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina.json
index ac43293..746000c 100644
--- a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina.json
+++ b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "SW",
"Folio": "123456",
- "Fecha": "2022-07-21T00:00:00",
+ "Fecha": "2023-05-12T00:00:00",
"Sello": "",
"NoCertificado": "",
"Certificado": "",
@@ -23,7 +23,7 @@
"Receptor": {
"Rfc": "XOJI740919U48",
"Nombre": "INGRID XODAR JIMENEZ",
- "DomicilioFiscalReceptor": "88965",
+ "DomicilioFiscalReceptor": "76028",
"RegimenFiscalReceptor": "605",
"UsoCFDI": "CN01"
},
diff --git a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina.xml b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina.xml
index da3d127..522d700 100644
--- a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina.xml
+++ b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina.xml
@@ -1,9 +1,9 @@
-
+
diff --git a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_Extraordinaria.json b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_Extraordinaria.json
index 4938cb9..3cd88bf 100644
--- a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_Extraordinaria.json
+++ b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_Extraordinaria.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "SW",
"Folio": "123456",
- "Fecha": "2022-07-21T00:00:00",
+ "Fecha": "2023-05-12T00:00:00",
"Sello": "",
"NoCertificado": "",
"Certificado": "",
@@ -23,7 +23,7 @@
"Receptor": {
"Rfc": "XOJI740919U48",
"Nombre": "INGRID XODAR JIMENEZ",
- "DomicilioFiscalReceptor": "88965",
+ "DomicilioFiscalReceptor": "76028",
"RegimenFiscalReceptor": "605",
"UsoCFDI": "CN01"
},
diff --git a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_Extraordinaria.xml b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_Extraordinaria.xml
index d042ae1..9e7c42f 100644
--- a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_Extraordinaria.xml
+++ b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_Extraordinaria.xml
@@ -1,9 +1,9 @@
-
+
diff --git a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_HorasExtra.json b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_HorasExtra.json
index bb01f72..324b71a 100644
--- a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_HorasExtra.json
+++ b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_HorasExtra.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "SW",
"Folio": "123456",
- "Fecha": "2022-10-03T00:00:00",
+ "Fecha": "2023-05-12T00:00:00",
"Sello": "",
"NoCertificado": "",
"Certificado": "",
@@ -23,7 +23,7 @@
"Receptor": {
"Rfc": "XOJI740919U48",
"Nombre": "INGRID XODAR JIMENEZ",
- "DomicilioFiscalReceptor": "88965",
+ "DomicilioFiscalReceptor": "76028",
"RegimenFiscalReceptor": "605",
"UsoCFDI": "CN01"
},
diff --git a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_HorasExtra.xml b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_HorasExtra.xml
index d1a930d..483d77e 100644
--- a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_HorasExtra.xml
+++ b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_HorasExtra.xml
@@ -1,9 +1,9 @@
-
+
diff --git a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_Incapacidades.json b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_Incapacidades.json
index 7be245f..4f3ff36 100644
--- a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_Incapacidades.json
+++ b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_Incapacidades.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "SW",
"Folio": "123456",
- "Fecha": "2022-07-21T00:00:00",
+ "Fecha": "2023-05-12T00:00:00",
"Sello": "",
"NoCertificado": "",
"Certificado": "",
@@ -23,7 +23,7 @@
"Receptor": {
"Rfc": "XOJI740919U48",
"Nombre": "INGRID XODAR JIMENEZ",
- "DomicilioFiscalReceptor": "88965",
+ "DomicilioFiscalReceptor": "76028",
"RegimenFiscalReceptor": "605",
"UsoCFDI": "CN01"
},
diff --git a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_Incapacidades.xml b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_Incapacidades.xml
index deb0c79..3c5a715 100644
--- a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_Incapacidades.xml
+++ b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_Incapacidades.xml
@@ -1,9 +1,9 @@
-
+
diff --git a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_JubilacionPensionRetiro.json b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_JubilacionPensionRetiro.json
index 1135531..5db89e9 100644
--- a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_JubilacionPensionRetiro.json
+++ b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_JubilacionPensionRetiro.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "SW",
"Folio": "123456",
- "Fecha": "2022-07-21T00:00:00",
+ "Fecha": "2023-05-12T00:00:00",
"Sello": "",
"NoCertificado": "",
"Certificado": "",
@@ -23,7 +23,7 @@
"Receptor": {
"Rfc": "XOJI740919U48",
"Nombre": "INGRID XODAR JIMENEZ",
- "DomicilioFiscalReceptor": "88965",
+ "DomicilioFiscalReceptor": "76028",
"RegimenFiscalReceptor": "605",
"UsoCFDI": "CN01"
},
diff --git a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_JubilacionPensionRetiro.xml b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_JubilacionPensionRetiro.xml
index 9c73ab2..0ecf5da 100644
--- a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_JubilacionPensionRetiro.xml
+++ b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_JubilacionPensionRetiro.xml
@@ -1,9 +1,9 @@
-
+
diff --git a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_JubilacionPensionRetiro2.json b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_JubilacionPensionRetiro2.json
index 67b07ef..232e734 100644
--- a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_JubilacionPensionRetiro2.json
+++ b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_JubilacionPensionRetiro2.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "SW",
"Folio": "123456",
- "Fecha": "2022-07-21T00:00:00",
+ "Fecha": "2023-05-12T00:00:00",
"Sello": "",
"NoCertificado": "",
"Certificado": "",
@@ -23,7 +23,7 @@
"Receptor": {
"Rfc": "XOJI740919U48",
"Nombre": "INGRID XODAR JIMENEZ",
- "DomicilioFiscalReceptor": "88965",
+ "DomicilioFiscalReceptor": "76028",
"RegimenFiscalReceptor": "605",
"UsoCFDI": "CN01"
},
diff --git a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_JubilacionPensionRetiro2.xml b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_JubilacionPensionRetiro2.xml
index 2158061..904d7c1 100644
--- a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_JubilacionPensionRetiro2.xml
+++ b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_JubilacionPensionRetiro2.xml
@@ -1,9 +1,9 @@
-
+
diff --git a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_SeparacionIndemnizacion.json b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_SeparacionIndemnizacion.json
index a011e7b..f1469a2 100644
--- a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_SeparacionIndemnizacion.json
+++ b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_SeparacionIndemnizacion.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "SW",
"Folio": "123456",
- "Fecha": "2022-07-21T00:00:00",
+ "Fecha": "2023-05-12T00:00:00",
"Sello": "",
"NoCertificado": "",
"Certificado": "",
@@ -23,7 +23,7 @@
"Receptor": {
"Rfc": "XOJI740919U48",
"Nombre": "INGRID XODAR JIMENEZ",
- "DomicilioFiscalReceptor": "88965",
+ "DomicilioFiscalReceptor": "76028",
"RegimenFiscalReceptor": "605",
"UsoCFDI": "CN01"
},
diff --git a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_SeparacionIndemnizacion.xml b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_SeparacionIndemnizacion.xml
index c52a11d..ff3567c 100644
--- a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_SeparacionIndemnizacion.xml
+++ b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_SeparacionIndemnizacion.xml
@@ -1,9 +1,9 @@
-
+
diff --git a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_SinDeducciones.json b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_SinDeducciones.json
index caeeb3b..20ed8e8 100644
--- a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_SinDeducciones.json
+++ b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_SinDeducciones.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "SW",
"Folio": "123456",
- "Fecha": "2022-07-21T00:00:00",
+ "Fecha": "2023-05-12T00:00:00",
"Sello": "",
"NoCertificado": "",
"Certificado": "",
@@ -23,7 +23,7 @@
"Receptor": {
"Rfc": "XOJI740919U48",
"Nombre": "INGRID XODAR JIMENEZ",
- "DomicilioFiscalReceptor": "88965",
+ "DomicilioFiscalReceptor": "76028",
"RegimenFiscalReceptor": "605",
"UsoCFDI": "CN01"
},
diff --git a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_SinDeducciones.xml b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_SinDeducciones.xml
index 7ac696b..1dc9051 100644
--- a/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_SinDeducciones.xml
+++ b/src/test/resources/CFDI40/Nomina12/CFDI40_Nomina_SinDeducciones.xml
@@ -1,9 +1,9 @@
-
+
diff --git a/src/test/resources/CFDI40/Pagos20/CFDI40_Pago.json b/src/test/resources/CFDI40/Pagos20/CFDI40_Pago.json
index 938fa2a..7d478ae 100644
--- a/src/test/resources/CFDI40/Pagos20/CFDI40_Pago.json
+++ b/src/test/resources/CFDI40/Pagos20/CFDI40_Pago.json
@@ -1,6 +1,6 @@
{
"Version": "4.0",
- "Fecha": "2022-03-30T16:26:19",
+ "Fecha": "2023-05-12T06:26:19",
"SubTotal": "0",
"Moneda": "XXX",
"Total": "0",
@@ -17,7 +17,7 @@
"Receptor": {
"Rfc": "URE180429TM6",
"Nombre": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
- "DomicilioFiscalReceptor": "65000",
+ "DomicilioFiscalReceptor": "86991",
"RegimenFiscalReceptor": "601",
"UsoCFDI": "CP01"
},
diff --git a/src/test/resources/CFDI40/Pagos20/CFDI40_Pago.xml b/src/test/resources/CFDI40/Pagos20/CFDI40_Pago.xml
index 4ad8589..a207d17 100644
--- a/src/test/resources/CFDI40/Pagos20/CFDI40_Pago.xml
+++ b/src/test/resources/CFDI40/Pagos20/CFDI40_Pago.xml
@@ -1,6 +1,6 @@
@@ -9,7 +9,7 @@
-
+
diff --git a/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_DoctoRelacionadoEnDolar.xml b/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_DoctoRelacionadoEnDolar.xml
index 3ea60e2..b9e3906 100644
--- a/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_DoctoRelacionadoEnDolar.xml
+++ b/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_DoctoRelacionadoEnDolar.xml
@@ -1,7 +1,7 @@
-
+
-
+
diff --git a/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_Dolar.json b/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_Dolar.json
index 26b2b3e..2b456c1 100644
--- a/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_Dolar.json
+++ b/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_Dolar.json
@@ -1,6 +1,6 @@
{
"Folio": "BANUS/2022/01/0002",
- "Fecha": "2022-03-29T10:00:45",
+ "Fecha": "2023-05-12T10:00:45",
"Sello": "",
"NoCertificado": "30001000000400002434",
"Certificado": "",
@@ -19,7 +19,7 @@
"Receptor": {
"Rfc": "URE180429TM6",
"Nombre": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
- "DomicilioFiscalReceptor": "65000",
+ "DomicilioFiscalReceptor": "86991",
"RegimenFiscalReceptor": "601",
"UsoCFDI": "CP01"
},
diff --git a/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_Dolar.xml b/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_Dolar.xml
index e8d1e6c..29db0a9 100644
--- a/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_Dolar.xml
+++ b/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_Dolar.xml
@@ -1,7 +1,7 @@
-
+
-
+
diff --git a/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_EURyDRenUSD.json b/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_EURyDRenUSD.json
index 8576e40..17dcfd4 100644
--- a/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_EURyDRenUSD.json
+++ b/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_EURyDRenUSD.json
@@ -2,7 +2,7 @@
"Version": "4.0",
"Serie": "S101",
"Folio": "BS/2022/01/0002",
- "Fecha": "2022-04-07T11:00:44",
+ "Fecha": "2023-05-12T11:00:44",
"Sello": "",
"NoCertificado": "30001000000400002434",
"Certificado": "",
@@ -20,7 +20,7 @@
"Receptor": {
"Rfc": "URE180429TM6",
"Nombre": "UNIVERSIDAD ROBOTICA ESPAÑOLA",
- "DomicilioFiscalReceptor": "65000",
+ "DomicilioFiscalReceptor": "86991",
"RegimenFiscalReceptor": "601",
"UsoCFDI": "CP01"
},
diff --git a/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_EURyDRenUSD.xml b/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_EURyDRenUSD.xml
index e8a3bdc..2107725 100644
--- a/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_EURyDRenUSD.xml
+++ b/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_EURyDRenUSD.xml
@@ -1,7 +1,7 @@
-
+
-
+
diff --git a/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_Factoraje.xml b/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_Factoraje.xml
index a995d59..b322d4f 100644
--- a/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_Factoraje.xml
+++ b/src/test/resources/CFDI40/Pagos20/CFDI40_Pago_Factoraje.xml
@@ -2,7 +2,7 @@
-
+
-
+
diff --git a/src/test/resources/CFDI40/ZIP/120000conceptos.zip b/src/test/resources/CFDI40/ZIP/120000conceptos.zip
new file mode 100644
index 0000000..0ac8f83
Binary files /dev/null and b/src/test/resources/CFDI40/ZIP/120000conceptos.zip differ
diff --git a/src/test/resources/CFDI40/ZIP/120000conceptosError.zip b/src/test/resources/CFDI40/ZIP/120000conceptosError.zip
new file mode 100644
index 0000000..17369b4
Binary files /dev/null and b/src/test/resources/CFDI40/ZIP/120000conceptosError.zip differ
diff --git a/src/test/resources/CFDI40/ZIP/120000conceptosEstructError.zip b/src/test/resources/CFDI40/ZIP/120000conceptosEstructError.zip
new file mode 100644
index 0000000..fa124d8
Binary files /dev/null and b/src/test/resources/CFDI40/ZIP/120000conceptosEstructError.zip differ
diff --git a/src/test/resources/CFDI40/ZIP/Mas120000conceptos.zip b/src/test/resources/CFDI40/ZIP/Mas120000conceptos.zip
new file mode 100644
index 0000000..76f0a3f
Binary files /dev/null and b/src/test/resources/CFDI40/ZIP/Mas120000conceptos.zip differ
diff --git a/src/test/resources/CertificadosDePrueba/EKU9003173C9.pfx b/src/test/resources/CertificadosDePrueba/EKU9003173C9.pfx
new file mode 100644
index 0000000..b08ee74
Binary files /dev/null and b/src/test/resources/CertificadosDePrueba/EKU9003173C9.pfx differ
diff --git a/src/test/resources/CertificadosDePrueba/PFX_EKU9003173C9.pfx b/src/test/resources/CertificadosDePrueba/PFX_EKU9003173C9.pfx
deleted file mode 100644
index c6c7ed5..0000000
Binary files a/src/test/resources/CertificadosDePrueba/PFX_EKU9003173C9.pfx and /dev/null differ
diff --git a/src/test/resources/Extras/AceptacionRechazo.xml b/src/test/resources/Extras/AceptacionRechazo.xml
new file mode 100644
index 0000000..dd078b3
--- /dev/null
+++ b/src/test/resources/Extras/AceptacionRechazo.xml
@@ -0,0 +1,33 @@
+
+
+
+ 06a46e4b-b154-4c12-bb77-f9a63ed55ff2
+ Aceptacion
+
+
+
+
+
+
+
+
+
+
+ AQ36cbqKJKHy5vaS6GhDTWtwKE4=
+
+
+ HVlFUPmRLyxeztem827eaasDObRXi+oqedCNNvDyMsRizqsS99cHt5mJCEE4vWgpDGPGLrph/yd++R4aN+V562DPp9qreFkisFpEvJy5Z8o/KzG7vc5qqaD8z9ohPpRERPHvxFrIm3ryEBqnSV6zqJG02PuxkWvYonVc+B7RdsO5iAiDTMs9guUhOvHBK8BVXQHKCbUAPCp/4YepZ4LUkcdloCAMPsN0x9GaUty2RMtNJuwaRWy+5IIBUCeXXZmQhoQfS0QfPpCByt0ago5v+FocJQiYQrsUV/8mesmNw5JoOCmufQYliQFyZgsstV8+h76dU/rwLr6R8YlFOkTxKg==
+
+
+
+ OID.1.2.840.113549.1.9.2=Responsable: ACDMA, OID.2.5.4.45=SAT970701NN3, L=Coyoacán, S=Distrito Federal, C=MX, PostalCode=06300, STREET="Av. Hidalgo 77, Col. Guerrero", E=asisnet@pruebas.sat.gob.mx, OU=Administración de Seguridad de la Información, O=Servicio de Administración Tributaria, CN=A.C. 2 de pruebas(4096)
+ 3230303031303030303030333030303232383135
+
+ MIIFxTCCA62gAwIBAgIUMjAwMDEwMDAwMDAzMDAwMjI4MTUwDQYJKoZIhvcNAQELBQAwggFmMSAwHgYDVQQDDBdBLkMuIDIgZGUgcHJ1ZWJhcyg0MDk2KTEvMC0GA1UECgwmU2VydmljaW8gZGUgQWRtaW5pc3RyYWNpw7NuIFRyaWJ1dGFyaWExODA2BgNVBAsML0FkbWluaXN0cmFjacOzbiBkZSBTZWd1cmlkYWQgZGUgbGEgSW5mb3JtYWNpw7NuMSkwJwYJKoZIhvcNAQkBFhphc2lzbmV0QHBydWViYXMuc2F0LmdvYi5teDEmMCQGA1UECQwdQXYuIEhpZGFsZ28gNzcsIENvbC4gR3VlcnJlcm8xDjAMBgNVBBEMBTA2MzAwMQswCQYDVQQGEwJNWDEZMBcGA1UECAwQRGlzdHJpdG8gRmVkZXJhbDESMBAGA1UEBww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O3A0wHAtQ97fjBfBiO5M8AEISAV7eZidIl3iaJJHkQbBYiiW2gikreUZKPUX0HmlnIqqQcBJhWKRu6Nqk6aZBTETLLpGrvF9OArV1JSsbdw/ZH+P88RAt5em5/gjwwtFlNHyiKG5w+UFpaZOK3gZP0su0sa6dlPeQ9EL4JlFkGqQCgSQ+NOsXqaOavgoP5VLykLwuGnwIUnuhBTVeDbzpgrg9LuF5dYp/zs+Y9ScJqe5VMAagLSYTShNtN8luV7LvxF9pgWwZdcM7lUwqJmUddCiZqdngg3vzTactMToG16gZA4CWnMgbU4E+r541+FNMpgAZNvs2CiW/eApfaaQojsZEAHDsDv4L5n3M1CC7fYjE/d61aSng1LaO6T1mh+dEfPvLzp7zyzz+UgWMhi5Cs4pcXx1eic5r7uxPoBwcCTt3YI1jKVVnV7/w=
+
+
+
+
+
\ No newline at end of file
diff --git a/src/test/resources/Extras/CFDI40_Ingreso_Timbrado.xml b/src/test/resources/Extras/CFDI40_Ingreso_Timbrado.xml
new file mode 100644
index 0000000..4228648
--- /dev/null
+++ b/src/test/resources/Extras/CFDI40_Ingreso_Timbrado.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/test/resources/Extras/CancelacionXML.xml b/src/test/resources/Extras/CancelacionXML.xml
new file mode 100644
index 0000000..46ab4af
--- /dev/null
+++ b/src/test/resources/Extras/CancelacionXML.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1vVfWk1jW3PXMyKnM643Bkt/H8g=
+
+
+ i3E0+BddPJ6SUxdvi1wdMM4pYQlKKx4UD/nCCp32N9ZklKP9XHRaT5sYpM+hcEM75pHI0orbbZueCIgaRN2jJUUb02uu7DAsc338kVchad3+gkEZokP+sKtbMIngbIisTtqdT3sgMTANSBe19C6gBpKG+hT1WDLtRy/Xyzk5ehXvSSGW58/I0j0RkwWAxg3W7DMqF20U1ORyNE7WHdRwN3TYoIQdaD+VwP8lN8YLI2qvlhvw3rqAC/PWzDiPM12ih+8afkD/PVUC3gJOV+aEAAUoTEv0FXvrXe7lPuPDLi6MvkBBfUgLd1WJtO1ZxBHYIG8s011OBzW81AhgLuC84A==
+
+
+
+ OID.1.2.840.113549.1.9.2=responsable: ACDMA-SAT, OID.2.5.4.45=2.5.4.45, L=COYOACAN, S=CIUDAD DE MEXICO, C=MX, PostalCode=06370, STREET=3ra cerrada de caliz, E=oscar.martinez@sat.gob.mx, OU=SAT-IES Authority, O=SERVICIO DE ADMINISTRACION TRIBUTARIA, CN=AC UAT
+ 292233162870206001759766198462772978647764840758
+
+ MIIFsDCCA5igAwIBAgIUMzAwMDEwMDAwMDA1MDAwMDM0MTYwDQYJKoZIhvcNAQELBQAwggErMQ8wDQYDVQQDDAZBQyBVQVQxLjAsBgNVBAoMJVNFUlZJQ0lPIERFIEFETUlOSVNUUkFDSU9OIFRSSUJVVEFSSUExGjAYBgNVBAsMEVNBVC1JRVMgQXV0aG9yaXR5MSgwJgYJKoZIhvcNAQkBFhlvc2Nhci5tYXJ0aW5lekBzYXQuZ29iLm14MR0wGwYDVQQJDBQzcmEgY2VycmFkYSBkZSBjYWxpejEOMAwGA1UEEQwFMDYzNzAxCzAJBgNVBAYTAk1YMRkwFwYDVQQIDBBDSVVEQUQgREUgTUVYSUNPMREwDwYDVQQHDAhDT1lPQUNBTjERMA8GA1UELRMIMi41LjQuNDUxJTAjBgkqhkiG9w0BCQITFnJlc3BvbnNhYmxlOiBBQ0RNQS1TQVQwHhcNMjMwNTE4MTE0MzUxWhcNMjcwNTE4MTE0MzUxWjCB1zEnMCUGA1UEAxMeRVNDVUVMQSBLRU1QRVIgVVJHQVRFIFNBIERFIENWMScwJQYDVQQpEx5FU0NVRUxBIEtFTVBFUiBVUkdBVEUgU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kdiHNJftm7Z4iRU7HOVh79/lRWB+gd171s3d/mI9kte3MRy6V8MMEMCAnMboGpaooYwgAmwclI2XZCczNWXfhaWe0ZS5PmytD/GDpXzkX0oEgY9K/uYo5V77NdZbGAjmyi8cE2B2ogvyaN2XfIInrZPgEffJ4AB7kFA2mwesdLOCh0BLD9itmCve3A1FGR4+stO2ANUoiI3w3Tv2yQSg4bjeDlJ08lXaaFCLW2peEXMXjQUk7fmpb5MNuOUTW6BE=
+
+
+
+
\ No newline at end of file
diff --git a/src/test/resources/Extras/ComercioExterior_Timbrado.xml b/src/test/resources/Extras/ComercioExterior_Timbrado.xml
new file mode 100644
index 0000000..73b4f45
--- /dev/null
+++ b/src/test/resources/Extras/ComercioExterior_Timbrado.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/test/resources/Extras/Nomina12_Timbrado.xml b/src/test/resources/Extras/Nomina12_Timbrado.xml
new file mode 100644
index 0000000..abe9771
--- /dev/null
+++ b/src/test/resources/Extras/Nomina12_Timbrado.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/test/resources/Extras/Pagos20_Timbrado.xml b/src/test/resources/Extras/Pagos20_Timbrado.xml
new file mode 100644
index 0000000..cf995f7
--- /dev/null
+++ b/src/test/resources/Extras/Pagos20_Timbrado.xml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file