![]() |
![]() |
![]() |
![]() |
![]() |
FTP | ![]() |
![]() |
CCD | ![]() |
![]() |
Buscar | ![]() |
![]() |
Trucos | ![]() |
![]() |
Trabajo | ![]() |
![]() |
Foros | ![]() |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
![]() |
|
Herramientas | Buscar en Tema | Desplegado |
|
#1
|
|||
|
|||
Buenos días. Conseguido funcionamiento en entorno de pruebas de Gipuzkoa.
Ahora estoy peleándome con Batuz y el LROE (Bizkaia). Pero sólo obtengo errores 400 del servidor. No consigo que acepte las peticiones. ¿ Alguien sabría decirme el por qué? Creo seguir las especificaciones. Para los de PHP (aunque no creo que sea difícil de entender por otros). Este es el código de la petición, a ver si alguien ha pasado por este trance ya: Código PHP:
No sé si el problema puede estar en la compresión a GZIP. Uso gzencode, pero también he probado con gzcompress y gzdeflate, con igual resultado. |
#2
|
|||
|
|||
Cita:
curl --insecure --cert-type P12 --cert nombre_certificado:contraseña_certificado -H "Accept-Encoding:gzip" -H "Content-Encoding:gzip" -H "Content-Type:application/octet-stream" -H "eus-bizkaia-n3-version:1.0" -H "eus-bizkaia-n3-content-type:application/xml" -H "eus-bizkaia-n3-data:{\"con\":\"LROE\",\"apa\":\"1.1\",\"inte\":{\"nif\":\"CIF\",\"nrs\":\"NOMBRE_EMPRESA\"},\"drs\" :{\"mode\":\"240\",\"ejer\":\"2021\"}}" -v "https://pruesarrerak.bizkaia.eus/N3B4001M/kontsulta" --data-binary "@c:\tmp\consulta.gz" --output c:\tmp\respuesta.gz -D c:\tmp\cabecera.txt y me funciona bien, comprimo con el 7z Saludos |
#3
|
|||
|
|||
Cita:
![]() Código:
$ curl --insecure --cert-type P12 --cacert cert_certFNMTEmpresa.pfx --pass contraseña -H "Accept-Encoding:gzip" -H "Content-Encoding:gzip" -H "Content-Type:application/octet-stream" -H "eus-bizkaia-n3-version:1.0" -H "eus-bizkaia-n3-content-type:application/xml" -H "eus-bizkaia-n3-data:{\"con\":\"LROE\",\"apa\":\"1.1\",\"inte\":{\"nif\":\"BXXXXXXXX\",\"nrs\":\"NOMBRE EMPRESA\"},\"drs\" :{\"mode\":\"240\",\"ejer\":\"2021\"}}" -v "https://pruesarrerak.bizkaia.eus/N3B4001M/kontsulta" --data-binary lroe_1624012540.gz --output respuesta.gz -D cabeceras_respuesta.txt % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 80.245.2.232... * TCP_NODELAY set 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to pruesarrerak.bizkaia.eus (80.245.2.232) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * error setting certificate verify locations, continuing anyway: * CAfile: cert_certFNMTEmpresa.pfx CApath: none } [5 bytes data] * TLSv1.3 (OUT), TLS handshake, Client hello (1): } [512 bytes data] * TLSv1.3 (IN), TLS handshake, Server hello (2): { [81 bytes data] * TLSv1.2 (IN), TLS handshake, Certificate (11): { [4450 bytes data] * TLSv1.2 (IN), TLS handshake, Server key exchange (12): { [527 bytes data] * TLSv1.2 (IN), TLS handshake, Request CERT (13): { [36 bytes data] * TLSv1.2 (IN), TLS handshake, Server finished (14): { [4 bytes data] * TLSv1.2 (OUT), TLS handshake, Certificate (11): } [7 bytes data] * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): } [134 bytes data] * TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1): } [1 bytes data] * TLSv1.2 (OUT), TLS handshake, Finished (20): } [16 bytes data] * TLSv1.2 (IN), TLS handshake, Finished (20): { [16 bytes data] * SSL connection using TLSv1.2 / DHE-RSA-AES256-GCM-SHA384 * ALPN, server did not agree to a protocol * Server certificate: * subject: jurisdictionC=ES; jurisdictionST=BIZKAIA; jurisdictionL=BILBAO; businessCategory=Government Entity; postalCode=48009; C=ES; ST=BIZKAIA; L=BILBAO; street=GRAN V�A 25; O=BIZKAIKO FORU ALDUNDIA - DIPUTACION FORAL DE BIZKAIA; OU=IT; serialNumber=P4800000D; CN=pruesarrerak.bizkaia.eus * start date: Jul 3 12:41:06 2020 GMT * expire date: Jul 3 12:41:06 2022 GMT * issuer: C=ES; O=IZENPE S.A.; OU=BZ Ziurtagiri publikoa - Certificado publico EV; CN=CA de Certificados SSL EV * SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway. } [5 bytes data] > POST /N3B4001M/kontsulta HTTP/1.1 > Host: pruesarrerak.bizkaia.eus > User-Agent: curl/7.64.0 > Accept: */* > Accept-Encoding:gzip > Content-Encoding:gzip > Content-Type:application/octet-stream > eus-bizkaia-n3-version:1.0 > eus-bizkaia-n3-content-type:application/xml > eus-bizkaia-n3-data:{"con":"LROE","apa":"1.1","inte":{"nif":"BXXXXXXXX","nrs":"NOMBRE EMPRESA"},"drs" :{"mode":"240","ejer":"2021"}} > Content-Length: 18 > } [18 bytes data] * upload completely sent off: 18 out of 18 bytes * OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104 100 18 0 0 100 18 0 68 --:--:-- --:--:-- --:--:-- 68 * Closing connection 0 curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104 |
#4
|
|||
|
|||
Cita:
Saludos |
#5
|
||||
|
||||
Cita:
¿Puedes poner esa cabecera? Puede ser algo como esto, por ejemplo: Código:
eus-bizkaia-n3-numero-registro= eus-bizkaia-n3-tipo-respuesta=Incorrecto Keep-Alive=timeout=5, max=100 X-Powered-By=Undertow/1 eus-bizkaia-n3-mensaje-respuesta=Todos los registros incluidos en la petición son incorrectos. eus-bizkaia-n3-codigo-respuesta=B4_1000002 Connection=Keep-Alive Content-Encoding=gzip Content-Length=8332 Date=Tue, 25 May 2021 08:17:36 GMT Content-Type=application/xml;charset=UTF-8 eus-bizkaia-n3-identificativo=94716
__________________
Germán Estévez => Web/Blog Guía de estilo, Guía alternativa Utiliza TAG's en tus mensajes. Contactar con el Clubdelphi ![]() P.D: Más tiempo dedicado a la pregunta=Mejores respuestas. |
#6
|
|||
|
|||
Cita:
Yo también lo hago con PHP, siguiendo, prácticamente, el mismo modelo que presentó en este hilo el colega Bilbur. Las únicas diferencias que encuentro es que yo no utilizo ninguna de estas dos líneas: Código PHP:
CURLOPT_SSL_VERIFYPEER - Ya está, por defecto en TRUE desde la versión 7.10 de Curl Saludos Última edición por Sistel fecha: 18-06-2021 a las 16:13:33. |
![]() |
|
|
![]() |
||||
Tema | Autor | Foro | Respuestas | Último mensaje |
SII -Nuevo sistema de la Agencia Tributaria española de envío de datos vía Webservice | newtron | Internet | 3706 | Hace 2 Semanas 09:38:43 |
Como utilizar la ayuda del nuevo Sistema Operativo | gluglu | Humor | 3 | 24-09-2007 09:39:05 |
Aplicacion Agencia De Viajes | ArdiIIa | Varios | 9 | 20-01-2007 16:49:53 |
El Vasco Aguirre | Al González | La Taberna | 5 | 26-05-2006 09:22:28 |
Microsoft ha lanzado su nuevo sistema operativo | DarkByte | Humor | 0 | 25-01-2004 09:21:14 |
![]() |
|