Hola, estoy enviando un fichero .xml y el resultado de pantalla es el siguiente :
.\curl\bin\curl --cert "empresa.pem" --key "empresa_key.pem" --data 1.xml --output respuesta.xml https://prewww1.aeat.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/VerifactuSOAP -v
Note: Using embedded CA bundle, for proxies (234847 bytes)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Host prewww1.aeat.es:443 was resolved.
* IPv6: (none)
* IPv4: 195.77.198.76
* Trying 195.77.198.76:443...
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [310 bytes data]
* CAfile: h:\segjose\HABOUR\gesman.new\xml\curl\bin\curl-ca-bundle.crt
* CApath: none
* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [87 bytes data]
* TLSv1.2 (IN), TLS handshake, Certificate (11):
{ [4208 bytes data]
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
{ [461 bytes data]
* TLSv1.2 (IN), TLS handshake, Request CERT (13):
{ [16652 bytes data]
* TLSv1.2 (IN), TLS handshake, Server finished (14):
{ [4 bytes data]
* TLSv1.2 (OUT), TLS handshake, Certificate (11):
} [2263 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
} [70 bytes data]
* TLSv1.2 (OUT), TLS handshake, CERT verify (15):
} [264 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 change cipher, Change cipher spec (1):
{ [1 bytes data]
* TLSv1.2 (IN), TLS handshake, Finished (20):
{ [16 bytes data]
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256 / [blank] / UNDEF
* ALPN: server did not agree on a protocol. Uses default.
* Server certificate:
* subject: C=ES; L=Madrid; O=Agencia Estatal de Administración Tributaria; CN=*.aeat.es
* start date: Oct 23 08:43:06 2023 GMT
* expire date: Nov 23 08:43:05 2024 GMT
* subjectAltName: host "prewww1.aeat.es" matched cert's "*.aeat.es"
* issuer: C=US; O=Entrust, Inc.; OU=See http://www.entrust.net/legal-terms; OU=(c) 2012 Entrust, Inc. - for authorized use only; CN=Entrust Certification Authority - L1K
* SSL certificate verify ok.
* Certificate level 0: Public key type ? (3072/128 Bits/secBits), signed using sha256WithRSAEncryption
* Certificate level 1: Public key type ? (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
* Certificate level 2: Public key type ? (2048/112 Bits/secBits), signed using sha256WithRSAEncryption
* Connected to prewww1.aeat.es (195.77.198.76) port 443
* using HTTP/1.x
> POST /wlpl/TIKE-CONT/ws/SistemaFacturacion/VerifactuSOAP HTTP/1.1
> Host: prewww1.aeat.es
> User-Agent: curl/8.10.1
> Accept: */*
> Content-Length: 5
> Content-Type: application/x-www-form-urlencoded
>
} [5 bytes data]
* upload completely sent off: 5 bytes
< HTTP/1.1 200 OK
< content-type: text/xml;charset=UTF-8
< dit-niu: 46020459447
< content-length: 5883
< dit-tarea: 66
< dit-servidor: WLP00302
< dit-idpeticion: 20241018105610810011
< date: Fri, 18 Oct 2024 08:56:10 GMT
< x-ua-compatible: IE=7
< set-cookie: CERT_WWW1=67CB69976D0E5FF41C7D26D010D2496F34BBC1197F7129B33126A25E9F60203B57E4A39D9C9F297C88FB5C679F33081E2CF44B049719987D86F02B4D441DA1144C34115264A99FB92774379AF3BC72C58AE5832BMxLYRXkJCCaAIY6SI0r2y2/XOFrur37gO+PI2Fkr5ULtoklOCJSncsfa2bAk4bP/iRnbPH9MyEjNh2YAsCqmsBXF3x+zf7q8+SKHvTqRExdXrJYJvMcwvgRHDmuMM+Yicw62wxgqE/7PrP4U/EdvOvvbJdPA0QeRPIHE8dkIGIqEc4xm76lelNcTEyBdX+M6UpgaV9pL7oMCzuisTl/fnH76G+dXCnQYpIi6SCUe4DG5LL80yLn53JeXiYeHQKOWXRuU9GVAb0yvb1JNnvpL3FdXaVB1BUE/nPN3eGWwN4WSM1HdLa+qUz+Gi2/Ax7bsvOuaRQismxMmLK3NdvWuisE6KNH4Uk+7x99/INZMOtFjb6WUvV5ZbGsQkM3ecenVFs8j+IrpxAV/HuOYV8HPASq/v6irMVkSr+qxov+XRUtqqKQ6xwR47eBY+kc6aCxZ+Q==; Domain=.aeat.es; Path=/; HttpOnly; Secure
< set-cookie: CERT_WWW1V=20241018-10261080; Domain=.aeat.es; Path=/; Secure
< set-cookie: sgat_id_usr_sede=%7B%22tipoAcceso%22%3A%22C%22%2C%22fechaYHora%22%3A%2220241018105610810%22%2C%22nombre%22%3A%22MAN%20SOFT%20COMPUTER%20SL%22%7D; Domain=.aeat.es; Path=/; Secure
< dit-codigo-respuesta: 0
< content-language: es-ES
< expires: Thu, 01 Dec 1994 16:00:00 GMT
< cache-control: no-cache="set-cookie, set-cookie2"
< x-site: Sede
< referrer-policy: strict-origin-when-cross-origin
< x-xss-protection: 1; mode=block
< strict-transport-security: max-age=31536000; includeSubDomains
< content-security-policy: frame-ancestors 'self' *.aeat.es
<
{ [2828 bytes data]
100 5888 100 5883 100 5 24593 20 --:--:-- --:--:-- --:--:-- 24843
* Connection #0 to host prewww1.aeat.es left intact
Y la respuesta es :
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Body>
<env:Fault>
<faultcode>env:Client</faultcode>
<faultstring>Codigo[1304].El contenido no está permitido en el prólogo. (1,1)</faultstring>
<detail>
<callstack>XML no válido o mal formado WSExcepcion [faultcode=null, detailMap=null, version=0, faultstring=El contenido no está permitido en el prólogo. (1,1), faultactor=null, faultSubCode=null, reasonText=null, detail=null, nameSpaceUriDetail=null] at es.aeat.adws.jdit.imp.ws.WSFilterSrvImpl.verificarFirma(WSFilterSrvImpl.java:845) at es.aeat.adws.jdit.imp.ws.WSFilterSrvImpl.doFilter(WSFilterSrvImpl.java:225) at es.aeat.adws.jdit.api.ws.WSFilter.doFilter(WSFilter.java:24) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:203) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:93) at es.aeat.adht.jdit.imp.infra.JDitFilterSrvImpl.filtroIni(JDitFilterSrvImpl.java:288) at es.aeat.adht.jdit.imp.infra.JDitFilterSrvImpl.doFilter(JDitFilterSrvImpl.java:101) at es.aeat.adht.jdit.imp.infra.JDitFilterSrvImpl.doFilter(JDitFilterSrvImpl.java:74) at es.aeat.adht.jdit.api.filter.JDitFilter.doFilter(JDitFilter.java:24) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:203) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:93) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:1069) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1260) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1078) at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:77) at com.ibm.ws.webcontainer40.servlet.CacheServletWrapper40.handleRequest(CacheServletWrapper40.java:87) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:978) at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:293) at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:1260) at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.wrapHandlerAndExecute(HttpDispatcherLink.java:476) at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink.ready(HttpDispatcherLink.java:435) at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:569) at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.handleNewRequest(HttpInboundLink.java:503) at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.processRequest(HttpInboundLink.java:363) at com.ibm.ws.http.channel.internal.inbound.HttpInboundLink.ready(HttpInboundLink.java:330) at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:169) at com.ibm.ws.tcpchannel.internal.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:77) at com.ibm.ws.tcpchannel.internal.WorkQueueManager.requestComplete(WorkQueueManager.java:516) at com.ibm.ws.tcpchannel.internal.WorkQueueManager.attemptIO(WorkQueueManager.java:586) at com.ibm.ws.tcpchannel.internal.WorkQueueManager.workerRun(WorkQueueManager.java:970) at com.ibm.ws.tcpchannel.internal.WorkQueueManager$Worker.run(WorkQueueManager.java:1059) at com.ibm.ws.threading.internal.ExecutorServiceImpl$RunnableWrapper.run(ExecutorServiceImpl.java:280) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Caused by: es.aeat.adws.jdit.api.xml.XmlExcepcion: El contenido no está permitido en el prólogo. (1,1) at es.aeat.adws.jdit.imp.xml.DomUtilsSrvImpl.isToDoc(DomUtilsSrvImpl.java:87) at es.aeat.adws.jdit.imp.xml.DomUtilsSrvImpl.isToDoc(DomUtilsSrvImpl.java:53) at es.aeat.adws.jdit.imp.ws.WSFilterSrvImpl.verificarFirma(WSFilterSrvImpl.java:773) ... 34 more Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; El contenido no está permitido en el prólogo. at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at java.xml/com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) at java.xml/com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at java.xml/com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at java.xml/com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at java.xml/com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source) at java.xml/com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source) at java.xml/javax.xml.parsers.DocumentBuilder.parse(Unknown Source) at es.aeat.adws.jdit.imp.xml.DomUtilsSrvImpl.isToDoc(DomUtilsSrvImpl.java:83) ... 36 more </callstack>
</detail>
</env:Fault>
</env:Body>
</env:Envelope>
Como me indico Paquito, el fallo creo que es la firma, ¿pero exactamente a que firma se refiere?
Alguna indicación para poder enviar y devuelva que correcto e indicando la dichosa "t".
Muchas Gracias