Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

101
Visualizações
pass data from array JSON to ajax

Maybe this question is frequent in the forums, but After days of searching the forum without success, I decided to ask for help.

I am trying to send to my web service an array of objects in JSON format, but without success, I always get a 500 error on the server side, I try different ways (especially found here) but I keep getting the same error.

the json format I get form a jquery plugin that transforms a table into JSON code.

this is the message from the navegator

Message: "Invalid web service call. Missing value for parameter: 'totalKilos'."

And this is my JSON Code

    {
        "lista": [
            {
                "idSolVenta": "1",
                "rutEmpresa": "123456789",
                "idDetalleSolicitud": "1",
                "idCategoria": "3",
                "idSubcategoria": "8",
                "CantidadKilos": "123456"
            },
            {
                "idSolVenta": "1",
                "rutEmpresa": "123456789",
                "idDetalleSolicitud": "1",
                "idCategoria": "3",
                "idSubcategoria": "8",
                "CantidadKilos": "123456"
            }
        ]
    }

//and more, it's dinamic

And this is my Ajax code

    $.ajax({
        type: "POST",
        contentType: "application/json; charset=utf-8",
        url: "http://localhost:63160/WebServiceDetalleSolicitudVenta.asmx/insertarSolicitudVenta",
        data:salida,
        //crossDomain: true,
        dataType: "json",
        beforeSend: function (x) {
            if (x && x.overrideMimeType) {
                x.overrideMimeType("application/j-son;charset=UTF-8");
            }
        },
        success: function () {
            alert("SUCCESS!");
        },
        error: function (msg, source, lineNo, columnNo, error) {
            alert("Error: " + msg +
                "\nScript: " + source +
                "\nLine: " + lineNo +
                "\nColumn: " + columnNo +
                "\nStackTrace: " + error);
        }

I am really desperate, I hope you can help me find an answer thank you very much to all

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda