Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

102
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda