meta data de esta página
Diferencias
Muestra las diferencias entre dos versiones de la página.
| Ambos lados, revisión anteriorRevisión previaPróxima revisión | Revisión previa | ||
| lenguaje_java [2021/06/15 02:22] – [PASO 2: Construir el objeto documento electrónico] jsojo | lenguaje_java [2022/08/29 19:34] (actual) – lmartinez | ||
|---|---|---|---|
| Línea 58: | Línea 58: | ||
| Cuenta demo para hacer pruebas | Cuenta demo para hacer pruebas | ||
| - | LINK: [[http://demoemision.thefactoryhka.com.pa/ | + | LINK: [[https://demointegracion.ebi-pac.com/ |
| Usuario: %%“SOLICITAR”; | Usuario: %%“SOLICITAR”; | ||
| Línea 64: | Línea 64: | ||
| Password: %%“SOLICITAR”; | Password: %%“SOLICITAR”; | ||
| - | Se instancia los objetos utilizados | + | <code -> |
| + | public class EnviarDocumentoElectronico { | ||
| - | String wsdl = " | ||
| - | < | + | // Se instancia los objetos utilizados |
| + | |||
| + | String wsdl = " | ||
| String tokenEmpresa = " | String tokenEmpresa = " | ||
| String tokenPassword = " | String tokenPassword = " | ||
| + | |||
| org.tempuri.Service service = new org.tempuri.Service(); | org.tempuri.Service service = new org.tempuri.Service(); | ||
| Línea 142: | Línea 146: | ||
| datosTransaccion.setCliente(factory.createCliente(cliente)); | datosTransaccion.setCliente(factory.createCliente(cliente)); | ||
| + | |||
| //Datos DatosTransaccion en documentoElectronico | //Datos DatosTransaccion en documentoElectronico | ||
| Línea 288: | Línea 293: | ||
| totalesSubTotales.setTotalTodosItems(factory.createTotalesSubTotalesTotalTodosItems(" | totalesSubTotales.setTotalTodosItems(factory.createTotalesSubTotalesTotalTodosItems(" | ||
| + | |||
| //Datos Entrada formaPago en totalesSubTotales | //Datos Entrada formaPago en totalesSubTotales | ||
| Línea 304: | Línea 310: | ||
| totalesSubTotales.setListaFormaPago(factory.createListaFormaPago(listaFormaPago)); | totalesSubTotales.setListaFormaPago(factory.createListaFormaPago(listaFormaPago)); | ||
| + | |||
| //Datos Entrada retencion en totalesSubTotales | //Datos Entrada retencion en totalesSubTotales | ||
| Línea 356: | Línea 363: | ||
| enviarResponse = port.enviar(tokenEmpresa, | enviarResponse = port.enviar(tokenEmpresa, | ||
| + | </ | ||
| + | |||
| + | ===== PASO 4: Obtener la respuesta de nuestro servicio web ===== | ||
| + | |||
| + | Recibirás una respuesta de nuestro servicio web, Se mostrara el código recibido con el mensaje y el código qr. | ||
| + | |||
| + | <code -> | ||
| + | // Respuesta | ||
| + | System.out.println(" | ||
| + | System.out.println(" | ||
| + | |||
| + | // link | ||
| + | URL url = new URL(enviarResponse.getQr().getValue()); | ||
| + | System.out.println(url.toURI()); | ||
| + | // | ||
| + | | ||
| + | } | ||
| + | catch (MalformedURLException | URISyntaxException e) { | ||
| + | System.out.println(" | ||
| + | } | ||
| + | } | ||
| + | | ||
| </ | </ | ||