Ver Mensaje Individual
  #2572  
Antiguo 11-01-2022
skatologiko skatologiko is offline
Miembro
 
Registrado: jul 2021
Posts: 27
Reputación: 0
skatologiko Va por buen camino
Añadir TAG's al código

¿Alguien ha conseguido enviar el famoso archivo comprimido a Vizcaya con la librerías Chilkat? Sí que consigo enviar el xml a Guipuzcoa, pero el de Vizcaya no, al ser un .gz,
Este es mi código en vb6:

Código:
Public Function EnviarXMLTbai(sFich As String) As String   'devuelve el identificadorTBAI que da el servidor

Dim http As New ChilkatHttp
Dim success As Boolean

' Get the XML we wish to send in the body of the request.
Dim sbXml As New ChilkatStringBuilder
success = sbXml.LoadFile(sFich, "utf-8")
If (success = False) Then
    Debug.Print ("Failed to load XML that is to be the HTTP request body")
    Exit Function
End If

Dim Url As String
Url = "tbai-z.egoitza.gipuzkoa.eus/sarrerak/alta"

Dim Resp As ChilkatHttpResponse

Set Resp = http.PostXml(Url, sbXml.GetAsString, "utf-8")

If (http.LastMethodSuccess = False) Then
    Debug.Print (http.LastErrorText)
    Exit Function
End If

http.ClearHeaders
EnviarXMLTbai =  Resp.StatusCode

Última edición por Neftali [Germán.Estévez] fecha: 12-01-2022 a las 08:51:59.
Responder Con Cita