![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|
|
#1
|
|||
|
|||
|
Hola de nuevo compañeros,
después de leer muchos hilos parece que lo he conseguido, así que pongo el código por si a alguien más le es de utilidad, aunque no hay control de errores ni nada. Código:
Private Sub CmdEnvioXML_Click()
Dim url As String
url = "https://prewww1.aeat.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/VerifactuSOAP"
Dim socket As New ChilkatSocket
success = socket.SetSslClientCertPfx("certificado.pfx", "Clave")
success = socket.Connect(url, 443, True, 5000)
Dim rest As New ChilkatRest
success = rest.UseConnection(socket, True)
Dim dat As String
Dim stringBuilder As New ChilkatStringBuilder
success = stringBuilder.LoadFile("Factura_de_Prueba.xml", "utf-8")
dat = stringBuilder.GetAsString()
success = rest.SendReqStringBody("POST", url, dat)
success = rest.ReadResponseHeader()
Text1.Text = "success: " & success & vbCrLf & vbCrLf & vbCrLf
Text1.Text = Text1.Text & "ReadRespBodyString: " & rest.ReadRespBodyString & vbCrLf & vbCrLf & vbCrLf
End Sub
|
|
#2
|
||||
|
||||
|
Cita:
Actualizo el mensaje #2 con la recopilacion de códigos, con este en VB6.
__________________
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. |
|
#3
|
|||
|
|||
|
Hola,
Yo hago el envío así: Código:
Dim Respuesta As New ChilkatHttpResponse
Dim http As New ChilkatHttp
Dim success As Long, strErr As String
http.ClearHeaders
http.setRequestHeader "Content-Type", "text/xml"
success = http.SetSslClientCertPfx(GetRutaCertificado, GetPasswordCertificado)
If (success = False) Then
strErr = http.LastErrorText
End If
Set Respuesta = http.PText("POST", url, xml.GetXml, "utf-8", "application/xml; charset=utf-8", 0, 0)
|
![]() |
| Herramientas | Buscar en Tema |
| Desplegado | |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| Firmar XML | CrazySoft | Varios | 6 | 19-09-2022 15:54:19 |
| Firmar XML | pepesoft | Varios | 1 | 23-11-2018 09:32:25 |
| Firmar xml | frankizzio | Varios | 2 | 25-03-2015 17:31:17 |
| Firmar PDF | keys | Varios | 1 | 06-05-2010 10:11:37 |
| Firmar PDF | j_fdez | Varios | 1 | 02-04-2008 15:16:18 |
|