Is it possible to use Datatable with soap wsdl ?

Is it possible to use Datatable with soap wsdl ?

mlotfimlotfi Posts: 60Questions: 5Answers: 0
edited February 2014 in General
I was wondering how to display some parsing data from an xml reponse from a wsdl.
Thanks

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    DataTables expects JSON data - however, using dataSrc as a function in 1.10 you could get the xml data and transform it into Javascript arrays and objects: http://next.datatables.net/reference/option/ajax.dataSrc

    Allan
  • mlotfimlotfi Posts: 60Questions: 5Answers: 0
    Thank you allan,

    Is there any api in java or jquery that transform the xml returned to this format :
    [code]
    {
    "demo": [
    [
    "Tiger Nixon",
    "System Architect",
    "Edinburgh",
    "5421",
    "2011/04/25",
    "$3,120"
    ],
    [
    "Garrett Winters",
    "Director",
    "Edinburgh",
    "8422",
    "2011/07/25",
    "$5,300"
    ],
    [
    "Donna Snider",
    "System Architect",
    "New York",
    "4226",
    "2011/01/25",
    "$3,120"
    ]
    ]
    }
    [/code]


    Thanks
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    There are a bunch of ways to convert from XML to JSON. Top three google links:

    http://davidwalsh.name/convert-xml-json
    http://stackoverflow.com/questions/1773550/xml-json-conversion-in-javascript
    https://code.google.com/p/x2js/

    Allan
  • mlotfimlotfi Posts: 60Questions: 5Answers: 0
    Thanks, allan.
This discussion has been closed.