Connect to VUCEM's web service to download XML of pedimentos

0

I am trying to connect to WEB SERVICE of vucem this is my code, it is with vb.NET This is the web service address:

  

link

and this is the error that sends me when it reaches this line:

res = Convert.ToString(pedi.consultarPedimentoCompleto(peticion))

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
    Dim pedi As New ws.pedimento.ConsultarPedimentoCompletoServicePortTypeClient()
    Dim peticion As New pedimento.ConsultarPedimentoCompletoPeticion With {
        .peticion = New pedimento.PeticionPedimento
    }

    Dim res As String = ""

    Try
        pedi.ClientCredentials.UserName.UserName = "usuario"
        pedi.ClientCredentials.UserName.Password = "*********"


        peticion.peticion.aduana = "070"
        peticion.peticion.patente = 3989
        peticion.peticion.pedimento = 8012530
        res = Convert.ToString(pedi.consultarPedimentoCompleto(peticion))
        TextBox1.Text = res
    Catch ex As Exception
        MsgBox(ex.ToString)
    End Try
End Sub
    
asked by Alex1890 24.10.2018 в 19:55
source

0 answers