Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

100
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!